Flutter – How to solve “Missing Purpose String in Info.plist File”

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:

Dear Developer,

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.

If you still have problem after above steps. Please add your comment below or contact us. We are happy to help!

Tagged : / / / /
Subscribe
Notify of
guest
10 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Edmund Ciego
Edmund Ciego
6 months ago

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, all apps submitted to the App Store that access user data are required to include a purpose string. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn’t contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

but this is how my installer looks in my podfile. 

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

would the code you added work if I just replace it? 

Last edited 6 months ago by Edmund Ciego
Rajesh
Rajesh
Reply to  Phuc Tran
3 months ago

Is it working? I have to the same case.

DODO
DODO
Reply to  Rajesh
2 months ago

I tried and it didn’t work.

DODO
DODO
Reply to  DODO
2 months ago

Sorry for lacking of information.
I use audio_service and audio_service use audio_session. The audio_session cause the issue. So as audio_session’s Readme.md file advice, I added these lines

target.build_configurations.each do |config|
  config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
    '$(inherited)',
    'AUDIO_SESSION_MICROPHONE=0'
  ]
end

to pod file then ITMS-90683: Missing Purpose String in Info.plist was gone.

Last edited 2 months ago by DODO
ekaperintis
11 months ago

I have same problame …

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 NSCalendarsUsageDescription key
with a user-facing purpose string explaining
clearly and completely why your app needs the data. Starting Spring
2019, all apps submitted to the App Store that access user data are
required to include a purpose string. If you’re using external libraries
or SDKs, they may reference APIs that require a
purpose string. While your app might not use these APIs, a purpose
string is still required. You can contact the developer of the library
or SDK and request they release a version of their code that doesn’t
contain the APIs

Adnan Kazi
Adnan Kazi
1 year ago

Thanks it works but now i am getting NSCalendarsUsageDescription error but it is not on pod file what should i do ?

Last edited 1 year ago by Adnan Kazi
10
0
Would love your thoughts, please comment.x
()
x