Baseflow / Baseflow/flutter-permission-handler

How to configure macros with incremental build option of podfile?

Open
#281 1 comment 2 reactions 0 assignees View on GitHub
P3 platform: ios type: question
Dominant language
Dart
Stars
2.2k
Forks
970
Avg merge
14h 22m
Merged PRs (30d)
2

Description

Hello,

I am using the incremental build option like explained here: https://github.com/FirebaseExtended/flutterfire/issues/349#issuecomment-605329947

Just wanted to ask how I should add the macros, to get it to work? This is my current attempt, but it get's rejected by the appstore.

As the comment says, it's necessary to use `installer.generated_projects` instead of `installer.pods_project.targets`.

``` ruby
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods',
:disable_input_output_paths => true,
:generate_multiple_pod_projects => true,
:incremental_installation => true

post_install do |installer|
installer.generated_projects.each do |target| ## Must use `installer.generated_projects` instead of `installer.pods_project.targets`
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'

config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',

## dart: PermissionGroup.calendar
'PERMISSION_EVENTS=0',

## dart: PermissionGroup.reminders
'PERMISSION_REMINDERS=0',

## dart: PermissionGroup.contacts
'PERMISSION_CONTACTS=0',

## dart: PermissionGroup.camera
# 'PERMISSION_CAMERA=0',

## dart: PermissionGroup.microphone
'PERMISSION_MICROPHONE=0',

## dart: PermissionGroup.speech
'PERMISSION_SPEECH_RECOGNIZER=0',

## dart: PermissionGroup.photos
# 'PERMISSION_PHOTOS=0',

## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
'PERMISSION_LOCATION=0',

## dart: PermissionGroup.notification
'PERMISSION_NOTIFICATIONS=0',

## dart: PermissionGroup.mediaLibrary
'PERMISSION_MEDIA_LIBRARY=0',

## dart: PermissionGroup.sensors
'PERMISSION_SENSORS=0'
]

end
end
end
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.