Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Appstore connect : Missing Purpose String in Info.plist File

EDIT April 2019 : You now have to add these two keys, as spring 2019 has begun. Note that NSLocationAlwaysUsageDescription is now deprecated (since iOS 11) and has been replaced with NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription. If you want to support lower than iOS 11, you'll have to use the three values.

To sum up you have to:

  • Add NSLocationAlwaysAndWhenInUseUsageDescription AND NSLocationWhenInUseUsageDescription for iOS 11 and more
  • And add NSLocationAlwaysUsageDescription if you want to support iOS 10 and less
  • And finally, you can add NSLocationUsageDescription if you wan to support iOS 8 and less.


You can submit your app even if you got this message !

I’ve just faced the same issue yesterday, even if the app isn’t using the location functionality. It may be related to some framework included in the project that have this optional feature.

I can confirm that my app has been approved even without the NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription key in info.plist

Indeed, as Apple stated in the mail :

Starting spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.

So the only thing to do is to add this key (right now is better, so that you won’t forget) in you project so that it will be included in your next update.

Just add two new entries in your info.plist, with NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription as keys and a short description of why you use them as the value (even if you don’t really use them...).


If you're using Expo, you can add solve by adding infoPlist to app.json like so:

  "expo": {
     "ios": {
       "bundleIdentifier": "com.app.myapp",
       "infoPlist": {
         "NSLocationAlwaysUsageDescription": "Some message to appease Apple.",
       },
     },
   }

Expo Docs


I have some apps in the store and I tried to distribute a version for QA and the same thing happened in two different Apps. I think this is a new criteria to accept the builds uploads to Appstore connect.

The solution is simple, add the following lines in the .plist file.

<key>NSLocationAlwaysUsageDescription</key>

<string>custom message</string>

<key>NSLocationWhenInUseUsageDescription</key>

<string>custom message</string>

PS: In my case have not using any feature of location, but I added these lines in order to comply with Appstore connect guidelines. Btw after receive that email, I could test the app even when they said that build it had some issues.

I hope this work for you guys.


It's a new requirement from apple, even if you do not use location. If you want to add the permissions in Xcode, look for "Privacy - Location Usage Description" and "Privacy - Location When In Use Usage Description" and type a custom string for each of them.

enter image description here