A
A
Adpluginx Documentation
Ask or search…
K
Comment on page

Configure Pod For Ios

Podfile
1
# Uncomment this line to define a global platform for your project
2
platform :ios, '13.0'
3
# Required for unity
4
source 'https://github.com/CocoaPods/Specs.git'
5
source 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
6
source 'https://github.com/Yodo1Games/MAS-Spec.git'
7
source 'https://github.com/Yodo1Games/Yodo1Spec.git'
8
9
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
10
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
11
12
project 'Runner', {
13
'Debug' => :debug,
14
'Profile' => :release,
15
'Release' => :release,
16
}
17
18
def flutter_root
19
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
20
unless File.exist?(generated_xcode_build_settings_path)
21
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
22
end
23
24
File.foreach(generated_xcode_build_settings_path) do |line|
25
matches = line.match(/FLUTTER_ROOT\=(.*)/)
26
return matches[1].strip if matches
27
end
28
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
29
end
30
31
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
32
33
flutter_ios_podfile_setup
34
35
target 'Runner' do
36
use_frameworks! :linkage => :static
37
use_modular_headers!
38
# For Unity Mediation
39
pod 'UnityMediationVungleAdapter'
40
pod 'UnityMediationFacebookAdapter'
41
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
42
end
43
44
# For OneSignal
45
target 'OneSignalNotificationServiceExtension' do
46
use_frameworks! :linkage => :static
47
pod 'OneSignalXCFramework', '>= 3.4.3', '< 4.0'
48
end
49
post_install do |installer|
50
installer.pods_project.targets.each do |target|
51
flutter_additional_ios_build_settings(target)
52
end
53
end