I am developing project which use the following permissions in Info.plist: NSCameraUsageDescription,
NSPhotoLibraryUsageDescription, NSMicrophoneUsageDescription, NSPhotoLibraryAddUsageDescription, NSCalendarsUsageDescription. App can browse photos library or take a picture. After the deployment process for submission on App Store I get the info:
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.
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.
In my app I don't use or ask user for location permission. Moreover I use the NuGet packages: Xamarin.Essentials, Forms, Plugin.Permissions. How can I workaround this issue with location permissions to avoid placing this ?
There is nothing that you can do to workaround the problem aside from removing plugins.
And there are no reasons to do something like that as the end-user won't see any difference unless you ask for the location in the app's code. Info.plist is not visible to the end user in any way including through the app listing.
I've submitted my app for review to the App Store Connect. Although the app is still under review, I've received an email to inform me that I have to fix an error. Here is the content of the message:
Dear Developer,
We identified one or more issues with a recent delivery for your app
XXXXX. Your delivery was successful, but you may wish to correct the
following issues in your next delivery:
"Missing Purpose String in Info.plist File. 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 will be 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.
After you’ve corrected the issues, you can use Xcode or Application
Loader to upload a new binary to iTunes Connect.
Best regards,
The App Store Team
My app is fully built with Expo and I don't know how to access and modify the Info.plist.
Any idea?
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.
For more simplifying you can add these lines in your info.plist. These error are coming because Starting spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.
Open info.plist as source code.
Add these following lines in your plist
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
##Use this key in info.plist file
NSLocationAlwaysUsageDescription
Your location is required for xyz benefits for you NSLocationWhenInUseUsageDescription
Your location is required for xyz benefits for you
"Missing Purpose String in Info.plist File. 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 will be 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.
Open Info.plist as source code.
Add these following lines in your plist
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
We did receive the same email and we aren't using the CoreLocation at all. After a quick search, we found that Parse SDK could use CoreLocation. In Apple's email, they clearly say:
If you're using external libraries or SDKs, they may reference APIs that require a purpose string.
That mean the minute your code or any other Library or SDKs can use CoreLocation, even if you don't use it, you need to provide privacy description for "When In Use" and "Always Use".
It is also something new from Apple and for now it's only a warning but it will be required starting in Spring 2019 for new submissions.
There are the following cases:
NSLocationAlwaysAndWhenInUseUsageDescription (iOS>11)
NSLocationWhenInUseUsageDescription (iOS>11)
NSLocationAlwaysUsageDescription (iOS<=10)
NSLocationUsageDescription (seems very old, iOS8?)
Apple states at:
Add the NSLocationWhenInUseUsageDescription key and the NSLocationAlwaysAndWhenInUseUsageDescription key to your Info.plist file.
and:
If your app supports iOS 10 and earlier, add the NSLocationAlwaysUsage
NSLocationUsageDescription seems dead, the only ref in ADC site is:
https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf
So to be sure, use first 3.
This issue is occurring because you haven't included
<NSLocationAlwaysUsageDescription>
for your app. I faced the same issue when I tried to submit my app on the AppStore. After the app was processed, I got the same mail. I just added the description and now its resolved.
Hope this helps.
These answers all tell you how to comply with the App Store rules to avoid the warning but the true fix would be for Expo to allow you to disable their SDKs requirement for Location Services unless you actually use them - I'm not sure if this is possible.
Please review the email you received from **App Store Connect **
Identify The Missing Key
Instructions
Open info.plist file.
Add and search for the missing key from the options provided (e.g. Contacts = Privacy - Contacts Usage Description)
Add Usage Description:
$(PRODUCT_NAME) needs Contacts access to "Provide The Reason Here".
Example:
same issue in Feb 19, got an email with a bunch of permissions I am not using, I assume they are from plugins. Apple says in March 19 it is a requirement so I am adding these in info.plst and uploading again.
It is very silly indeed.
I had
<key>NSLocationWhenInUseUsageDescription </key>
instead of
<key>NSLocationWhenInUseUsageDescription</key>
be sure to remove trailing whitespace
I also face the same issue but after 27 hours, I received the email about approved even I did nothing. So wait for approximately 24 hours instead of doing all this process again.
With Xcode 11 copy the key NSLocationAlwaysUsageDescription and add this to Info -> Custom iOS Target Properties -> Click + in the bottom left of this tab and as a value insert some kind of description like This app requires location access to function properly..
My app also got that, and I do nothing about it but it can run well ,next time I think should add such key in plist,just do some description
A short answer to the above problem -
NSLocationAlwaysUsageDescription must be updated with the following description in Info.plist file
{Your App Name} requires access to the location to suggest dengue
outbreak zones.
In our case, we were using NSLocationWhenInUseUsageDescription in our app, but not NSLocationAlwaysUsageDescription.
Reading from the comments here (thanks matt-oakes), it looks like NSLocationAlwaysUsageDescription is being used by one of the dependency frameworks we use.
Running our app it doesn't show the actual NSLocationAlwaysUsageDescription permission modal, so it looks to just handle this in the background.
So in summary, adding NSLocationAlwaysUsageDescription to the Info.plist fixed the warning email, and did not change any behaviour in the app 👍🏻
Last week i have launched my app to app store after two days i got a metadata rejection from the review due to providing invalid demo account later i provided my valid account after again they came up with other issues that is
Hello,
Thank you for your response and for providing this information.
However, upon further review we noticed that your app does not comply with the following guideline:
Guideline 5.1.5 - Legal - Privacy - Location Services
Your app uses background location services but does not clarify the purpose of its use in the location modal alert as required in the iOS Human Interface Guidelines.
Please see attached screenshots for details.
Next Steps
To resolve this issue, please revise the NSLocationAlwaysUsageDescription value in the Info.plist to specify the intended purpose of using the user's location while the app is in the background.
Resources
For additional information and instructions on configuring and presenting an alert, please review the Requesting Permission section of the iOS Human Interface Guidelines and the Information Property List Key Reference.
We look forward to reviewing your revised app.
Best regards,
App Store Review
But still my app store status is showing metadata rejected.Now what should i do whether i need to update my proper reasons in plist and rebuild to launch my app or else any other steps to follow????
Hi i have also faced the same issue even after adding NSLocationAlwaysUsageDescription with description in info.plist My App has rejected by apple.If we use locationManager.requestAlwaysAuthorization() you need to explain how you are going to use user location. But in my situation While initializing LocationManager i have changed locationManager.requestAlwaysAuthorization() to locationManager.requestWhenInUseAuthorization() Hope it will work for you too.
You need to add the proper reason of why you need the location service in the App.
You can set it by following way
Steps
Go to info.plist file.
Add your reason of accessing location service under key "Privacy -
Location Always Usage Description"
You will see the plist like this after adding the location service
It seems like your application is rejected because of the insufficient justification of using the location services in the background.You should add description for alert why your application is using the location in background in NSLocationAlwaysUsageDescription in info.plist file of your project. As well as you should mention it in your application description as well that why your application is using location services in background.(i.e for geo-fence or track user location.) Also mention that "continuous use of location may drain the battery dramatically" in application description.
By these steps you will be able to successfully submit your application to the apple store.
Add NSLocationAlwaysUsageDescription with description in info.plist
Go to your Project settings and increment the build number.
Upload a new build and submit your app again.
Update your info.plist file and add NSLocationAlwaysUsageDescription key with description.
Change (Increase) your build number (highlighted in attached image)
Re-upload your app to Itunes Store and submit for review.
You Must upload new Binary because your change is in your app's Info.plist file. See Next Step in your rejection message.
After add valid reason in info.plist file. Make app build with higher version.
Go to AppStore and Click on + button With increment app version. Add new Binary after deleting old One. and Upload for Review.
I have a Cordova app that runs in iOS phones. I'm trying to send an update of this app to App Store, but it is being rejected. Firstly it was rejected because the info.plist contained a line with the key NSBluetoothPeripheralUsageDescription and this feature is never used in my app. To solve this problem I removed this line from info.plist and the respective framework from Linked Frameworks and Libraries in xCode (the framework CoreBluetooth.framework and the line NSBluetoothPeripheralUsageDescription was added by Cordova Diagnostic Plugin), as can be seen in the image below:
However now I'm receiving a e-mail from iTunes Connect saying this:
Missing Info.plist key - This app attempts to access privacy-sensitive
data without a usage description. The app's Info.plist must contain an
NSBluetoothPeripheralUsageDescription key with a string value
explaining to the user how the app uses this data.
But I removed the CoreBluetooth.framework from the xCode project...
My question is: I need to remove this framework from another place? Are some other framework able to use bluetooth causing this problem?
Thanks for help.
Open Info Plist file and press on + sign add new key in info.plist of your project and add this NSBluetoothPeripheralUsageDescription and write value "Explain the reasons for bluetooth"
Check Screen shot below
It appears that you cannot have a generic text string like:
We need access to your bluetooth connection.
I had something like this and got rejected. When I had a more detailed description like:
We need access to your bluetooth connection to upload data from your
device for crash reports.
I was approved.
The descriptions are mandatory for any content you or any frameworks you link against attempt to access. The errors are generated upon an attempt to access the content if a usage description was not supplied, so if you're getting those errors your app must be requesting them. You should discover why your app or its frameworks require these and add appropriate usage descriptions to your app's info.plist.
Or more ideally, if you don't need access, see if there's a way to not request it (or use frameworks that do unnecessarily).
For time being you can add the following descriptions in your info.plist and submit your app (in case of urgent app update)
<key>NSCalendarsUsageDescription</key>
<string>Explain the reasons for accessing...</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Explain the reasons for accessing...</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Explain the reasons for accessing...</string>
Just open your info.plist and add the code above accordingly.
Try to add below in your plist. It solve my problem.
<config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
<string>YourAppName would like to store a photo.</string>
</config-file>
I found this thread because I had the same problem.
My experience was that I had installed a Bluetooth package with cordova, but, the experiment fail, and with the new copiles has this issue.
I checked the package.json, the package-lock.json and that I removed all the refences to my code. But, still falling.
Then I checked the pods bundle and found the Bluetooth bundle, but still failing.
I remove and add the platform ios and still falling.
Then I check the project and in the plugins folder I have the Bluetooth plugins folder. Removed, Compiled and works again.
I hope to help you.
I am trying to submit my app for review in Itunes Connect, but when I try to submit it I get an error:
To configure this app as an IOS routing app, upload a routing app
coverage file on the app's Version page in My Apps on iTunes Connect.
To configure your app as an IOS routing app, the app's Info.plist must
contain the MKDirectionsApplicationSupportedModes key.
So in my project, in the Capabilities, the Maps is turned off. I do have the MapKit.framework in my project, as I do utilize the map, however I do not ever show routing information nor provide it in my app. Is the fact that this framework in my project causing this ITunes Connect error, and if so, how do I go about fixing it. And by fixing it, I want it to turn off routing.
My app is not made to provide routing information, nor do I want to set it as an iOS routing app.
Any help would be appreciated.
I am using XCode 6.
I figured it out. In my info plist there was a document type name of MKDirectionsRequest. Removing that solved the problem.
From the apple docs
(To use the features of the Map Kit framework, you must turn on the
Maps capability in your Xcode project.)
above the entire paragraph.(https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009497)
Location-based information consists of two pieces: location services
and maps. Location services are provided by the Core Location
framework, which defines Objective-C interfaces for obtaining
information about the user’s location and heading (the direction in
which a device is pointing). Maps are provided by the Map Kit
framework, which supports both the display and annotation of maps
similar to those found in the Maps app. (To use the features of the
Map Kit framework, you must turn on the Maps capability in your Xcode
project.) Location services and maps are available on both iOS and OS
X.
Not sure but maybe you only need to turn on mapkit
In my info.plist I had to delete two entries:
1) the document you referenced above - MKDirectionsRequest
and
2) MKDirectionsApplicationSupportedModes - MKDirectionsModeCar which is called "Maps routing app supported modes"
I just faced this exact issue last week.
I had accidentally turned on Map capabilities and turned it off later. Like your case, this didn't fix the issue.
I believe what fixed it was removing MapKit from here.
I was trying other things at the time so try this and if this isn't it then I'll see if something else I changed fix this.