34 lines
1.2 KiB
Ruby
34 lines
1.2 KiB
Ruby
post_install do |installer|
|
|
installer.pods_project.targets.each do |target|
|
|
flutter_additional_ios_build_settings(target)
|
|
|
|
target.build_configurations.each do |config|
|
|
# You can remove unused permissions here
|
|
# for more information: https://github.com/BaseflowIT/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h
|
|
# e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0'
|
|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
|
|
'$(inherited)',
|
|
|
|
## dart: PermissionGroup.camera
|
|
'PERMISSION_CAMERA=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=0',
|
|
'PERMISSION_LOCATION_WHENINUSE=1',
|
|
|
|
## dart: PermissionGroup.notification
|
|
'PERMISSION_NOTIFICATIONS=1',
|
|
|
|
|
|
## dart: PermissionGroup.criticalAlerts
|
|
'PERMISSION_CRITICAL_ALERTS=1',
|
|
|
|
]
|
|
|
|
end
|
|
end
|
|
end |