ITMS-90683: Missing Purpose String in Info.plist - ios

Deploying the app on testFlight I'm having the following issue,
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.
Even if I have include on the Info.plist file the keys needed for the location access.
The app is submitted for review and tests but I'm still getting an email on every submit that says:
Version: 1.0.2 Build: 74) has one or more issues
I've checked the solution here in order to add the deprecated keys too
Error Appstore connect : Missing Purpose String in Info.plist File
Sorry, perhaps I'm missing something here?

Right click on your Info.plist file. then click on 'Open As' -> 'Source Code'.
Now find and replace below keys,
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>your description.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>your description</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>your description.</string>
Property list view of your info.plist is not showing like
Privacy - Location always and when In Use Usage Description
Privacy - Location always Usage Description
Instead it is showing NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationAlwaysUsageDescription

Related

iTunes Connect complains about my Xamarin Forms app "Missing Purpose String in Info.plist"

I submitted a Xamarin Forms iOS application to the App Store, but received the following email:
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 NSContactsUsageDescription key with a
user-facing purpose....
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...
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 NSMicrophoneUsageDescription key with
a user-facing purpose...
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 NSAppleMusicUsageDescription key with
a user-facing purpose
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 NSSiriUsageDescription key with a
user-facing purpose
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 NSBluetoothAlwaysUsageDescription key
with a user-facing purpose
However I'm not using any of the permissions mentioned above. My only Nuget references are
Acr.UserDialogs
Newtonsoft.Json
SharpZipLib
I added the missing strings to the info.plist and resubmitted the App. Didn't get the email but Apple still rejected it, asking for further information regarding how the app uses the requested permissions.
Any help is greatly appreciated!
The issue was related to the "Mono Linker". A million thanks to #SushiHangover in the comments above for pointing it out.
If anyone is experiencing the same problem, simply go to the iOS project options and set the linker to "Link All" as shown below:
Awesome! My Xamarin Forms IOS app was passing the Apple upload validation process but wasn't visible in testflight. I was scratching my head, I tried changing the Linker settings to "Link All" from "Don't Link" and that fixed the issue.. I had a gotten a email from apple saying that my app was missing several purpose strings in my info.plist file such as microphone and contacts etc just like the poster of this thread...

Rejected react native iOS app due to Missing Purpose String in Info.plist File from appstore

I got the following mail from appstore due to missing purpose string in info.plist file.
This is a React Native application that supports both iOS and Android.
My app is not requesting access to the user's calendar.
I thought the description only was mandatory if you actually requested a permission, or are these descriptions mandatory even if I never request to see the users calendar.
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 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 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. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
Sometimes, packages you install will reference APIs that you don't really need. For example, react-native-permissions does this, and you must add a usage description for all the APIs they use.
The react-native-permissions package explains this here: https://github.com/yonahforst/react-native-permissions#app-store-submission-disclaimer
If you need to submit you application to the AppStore, you need to add to your Info.plist all *UsageDescription keys with a string value explaining to the user how the app uses this data. Even if you don't use them.
And this is an example of how your Info.plist file should look like:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Some description</string>
<key>NSCalendarsUsageDescription</key>
<string>Some description</string>
<key>NSCameraUsageDescription</key>
<string>Some description</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Some description</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Some description</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Some description</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Some description</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Some description</string>
<key>NSAppleMusicUsageDescription</key>
<string>Some description</string>
<key>NSMotionUsageDescription</key>
<string>Some description</string>

Xcode - Missing Purpose String in Info.plist File

I am trying to upload a new version of my app to iTunes Connect from Xcode.
I keep getting an email saying my app's "Info.plist file should contain a NSCalendarsUsageDescription key"
I have already added these strings to my Info.plist:
<key>NSMicrophoneUsageDescription</key>
<string>microphone use</string>
<key>NSCalendarsUsageDescription</key>
<string>calendar use</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>photo and video use.</string>
But, I still get the email that my Info.plist is missing the NSCalendarsUsageDescription key
Is there something else I need to add? Apple's website says I need to "Use the specified APIs to request authorization to use the data or resource." I am new to coding and don't know what this means!
https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy
It is not enough to write "calendar use". The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data. So provide a better explanation of why your app needs to access this data.
I solved this problem by adding the Usage Description Strings to the "Custom iOS Target Properties" rather than only adding them to my info.Plist

iOS 11 Location not working

I have now added all of these 4 related to Location:
NSLocationWhenInUseUsageDescription
NSLocationUsageDescription
NSLocationAlwaysUsageDescription
NSLocationAlwaysAndWhenInUseUsageDescription
BUT still I get this in console:
This app has attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain both NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription keys with string values explaining to the user how the app uses this data
And the app don't gets location.
open your plist as source code (right click->open source code).
Inside the <dict></dict> you must add both the key and a description key like this:
<key>NSLocationWhenInUseUsageDescription</key>
<string>The app use your location when in use</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>The app use your location always</string>

Xcode 9 - Warning on Location usage Description in Info.plist - iOS 11

I've just updated to Xcode 9.0 official version and when I run my app which uses Location service, it works fine but the console prints the following warning:
The app's Info.plist must contain both NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription keys with string values explaining to the user how the app uses this data
So I've tried to add the following key in my Info.plist:
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs your current location</string>
But when I try to run the app again Xcode 9 shows an alert that says: The data couldn’t be read because it isn’t in the correct format.
So I switched back to:
<key>NSLocationAlwaysUsageDescription</key>
And the app works fine. Oh, and my Info.plist already contains the NSLocationWhenInUseUsageDescription key!
Is that a Xcode 9 bug in the console? Is anyone getting the same warning?
Nevermind, I've fixed it by simply browsing and selecting the right Privacy - Location usage options in Info.plist -> Open As -> Property List view, here's the right keys to insert into Info.plist in case you need it:
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs your current location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs your current location</string>

Resources