dev
text 85 lines 2.63 KB
Raw
1 # Uncomment this line to define a global platform for your project
2 platform :ios, '13.1'
3 source 'https://github.com/CocoaPods/Specs.git'
4
5 # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
6 ENV['COCOAPODS_DISABLE_STATS'] = 'true'
7
8 project 'Runner', {
9 'Debug' => :debug,
10 'Profile' => :release,
11 'Release' => :release,
12 }
13
14 def flutter_root
15 generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
16 unless File.exist?(generated_xcode_build_settings_path)
17 raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
18 end
19
20 File.foreach(generated_xcode_build_settings_path) do |line|
21 matches = line.match(/FLUTTER_ROOT\=(.*)/)
22 return matches[1].strip if matches
23 end
24 raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
25 end
26
27 require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
28
29 flutter_ios_podfile_setup
30
31 target 'Runner' do
32 use_frameworks!
33 use_modular_headers!
34
35 flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
36
37 # Cake Wallet (Legacy)
38 pod 'CryptoSwift'
39 end
40
41 post_install do |installer|
42 installer.pods_project.targets.each do |target|
43 flutter_additional_ios_build_settings(target)
44
45 target.build_configurations.each do |config|
46 config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
47 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
48 '$(inherited)',
49
50 ## dart: PermissionGroup.calendar
51 'PERMISSION_EVENTS=0',
52
53 ## dart: PermissionGroup.reminders
54 'PERMISSION_REMINDERS=0',
55
56 ## dart: PermissionGroup.contacts
57 'PERMISSION_CONTACTS=0',
58
59 ## dart: PermissionGroup.camera
60 'PERMISSION_CAMERA=1',
61
62 ## dart: PermissionGroup.microphone
63 'PERMISSION_MICROPHONE=1',
64
65 ## dart: PermissionGroup.speech
66 'PERMISSION_SPEECH_RECOGNIZER=0',
67
68 ## dart: PermissionGroup.photos
69 'PERMISSION_PHOTOS=1',
70
71 ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
72 'PERMISSION_LOCATION=0',
73
74 ## dart: PermissionGroup.notification
75 'PERMISSION_NOTIFICATIONS=0',
76
77 ## dart: PermissionGroup.mediaLibrary
78 'PERMISSION_MEDIA_LIBRARY=0',
79
80 ## dart: PermissionGroup.sensors
81 'PERMISSION_SENSORS=0'
82 ]
83 end
84 end
85 end