Step 1: Check your email to see if your app really needs the listed permissions. In the email, Apple will list all the purpose strings we need to provide in the Info.plist. Below is an example:
We identified one or more issues with a recent delivery for your app, “XXX” 1.0.0 (1). Your delivery was successful, but you may wish to correct the following issues in your next delivery:
ITMS-90683: Missing Purpose String in Info.plist – Your app’s code references one or more APIs that access sensitive user data. The app’s Info.plist file should contain a NSLocationAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, …
ITMS-90683: Missing Purpose String in Info.plist – Your app’s code references one or more APIs that access sensitive user data. The app’s Info.plist file should contain a NSLocationWhenInUseUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, …
As you can see, they mention clearly the keys, if your app uses those permissions. You just simply open your Xcode, then copy those keys to your Info.plist and provide the purpose strings.
Step 2: If you are using flutter-permission-handler package, in the email from Apple, you will see many strange permissions that you even don’t know. In this case, you have to add below script to your Podfile (Uncomment – remove # – the permissions you don’t need).
post_install do |installer| installer.pods_project.targets.each do |target| 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
Now, it’s time to rebuild your app and upload to Testflight.