forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPodfile
More file actions
109 lines (89 loc) · 3.92 KB
/
Copy pathPodfile
File metadata and controls
109 lines (89 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Uncomment this line to define a global platform for your project
platform :ios, '15.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug-prod' => :debug,
'Profile-prod' => :release,
'Release-prod' => :release,
'Debug-dev' => :debug,
'Profile-dev' => :release,
'Release-dev' => :release,
'Debug-raybanDat' => :debug,
'Profile-raybanDat' => :release,
'Release-raybanDat' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
require_relative 'rayban_dat_plugin_boundary'
flutter_ios_podfile_setup
if ENV['OMI_RAYBAN_DAT'] == '1'
RayBanDatPluginBoundary.prepare!(
app_root: File.expand_path('..', __dir__),
env: ENV,
)
target 'RunnerRayBanDat' do
use_frameworks! :linkage => :static
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'TwilioVoice', '~> 6.13'
end
else
# The default graph is untouched, including mcumgr_flutter firmware OTA.
target 'Runner' do
use_frameworks! :linkage => :static
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'TwilioVoice', '~> 6.13'
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
# dart: PermissionGroup.notification
'PERMISSION_NOTIFICATIONS=1',
# dart: PermissionGroup.bluetooth
'PERMISSION_BLUETOOTH=1',
# dart: PermissionGroup.microphone
'PERMISSION_MICROPHONE=1',
## The 'PERMISSION_LOCATION' macro enables the `locationWhenInUse` and `locationAlways` permission. If
## the application only requires `locationWhenInUse`, only specify the `PERMISSION_LOCATION_WHENINUSE`
## macro.
##
## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
'PERMISSION_LOCATION=1',
'PERMISSION_LOCATION_WHENINUSE=1',
'PERMISSION_LOCATION_ALWAYS=1',
## dart: PermissionGroup.calendarFullAccess
'PERMISSION_EVENTS_FULL_ACCESS=1',
## dart: PermissionGroup.calendar
'PERMISSION_EVENTS=1',
]
end
end
# ################ Awesome Notifications pod modification 1 ###################
# awesome_pod_file = File.expand_path(File.join('plugins', 'awesome_notifications', 'ios', 'Scripts', 'AwesomePodFile'), '.symlinks')
# require awesome_pod_file
# update_awesome_pod_build_settings(installer)
# ################ Awesome Notifications pod modification 1 ###################
end
#
# ################ Awesome Notifications pod modification 2 ###################
# awesome_pod_file = File.expand_path(File.join('plugins', 'awesome_notifications', 'ios', 'Scripts', 'AwesomePodFile'), '.symlinks')
# require awesome_pod_file
# update_awesome_main_target_settings('Runner', File.dirname(File.realpath(__FILE__)), flutter_root)
# ################ Awesome Notifications pod modification 2 ###################