The app's Info.plist must contain an NSContactsUsageDescription key - ios

I am getting a crash below:
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data.
But I have already added the 'Privacy - Contacts Usage Description' key

Please check your .plist as a source code and see if your key doesn't contain space at the end like:
<key>NSContactsUsageDescription </key>

Could be that you have accidentally added the key to your UITests target. I've done that a few times with the location privacy keys.
By the way, your contacts usage description "Allow contact access" probably would not pass Apple's review, because it does not state why you want to use them.

if you are using App test and and App UItest then there would be multple plist files in your project just make it sure you are adding discription in right if plist

Go To info.plist And
Privacy - Contacts Usage Description
Value : Allow Contact Access For Details
enter image description here

I had this problem. There was no Info.plist in a new project and adding it didn't do anything.
Solution:
Click project
Select Info tab
HERE you can add stuff!

Related

NSPhotoLibraryAddUsageDescription required but already in the plist.info

im using a screen capture code with UIGraphicsGetImageFromCurrentImageContext() and then UIActivityViewController to allow users to select what to do with the screenshot image
its all works but when i click on save image i get console error:
This app has crashed because it attempted to access privacy-sensitive data without a usage description. > The app's Info.plist must contain an NSPhotoLibraryAddUsageDescription key with a string value explaining to the user how the app uses this data.
I checked the plist.info and it already has NSPhotoLibraryAddUsageDescription listed in there
So why is it not recognising it and still giving this error?
I tried deleting derived data and cleaned build folder.
Check plist again if the key is NSPhotoLibraryAddUsageDescription, not NSPhotoLibraryUsageDescription.
Apple document for adding this key to plist and requesting permission :
https://developer.apple.com/documentation/bundleresources/information_property_list/protected_resources/requesting_authorization_to_access_photos

Binary file was removed from activity of iTunesConnect

I'm confused that my iOS binary file was automatically removed from activity of iTunesConnect.
I confirmed that the binary file was uploaded as shown in the image. And I tried twice though..
Is this iTunesConnect bug or Should I fix something in my code?
Does anyone have suggestion?
Adding missing privacy-sensitive key data usage in apps "Info.plist" the problem can be fixed.
Check and add the missing keys in your Info.plist file. Refer the link https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html for more info.
Some keys might be used by the 3rd party pods included in your application. Find them and include in your Info.plist file.(You can get them easily from App Store email sent to you)
Keys Examples similar to which you will need to add: NSCalendarsUsageDescription,NSContactsUsageDescription, NSLocationWhenInUseUsageDescription, NSPhotoLibraryUsageDescription etc.

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...

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

Xcode 8 Invalid Binary

My app only require iCloud UIDocument service. However, it sent me a warning email below and a invalid binary warning notification after uploading to iTunesConnect from Xcode 8.
It is non-sense to ask me to add NSCalendarsUsageDescription and NSBluetoothPeripheralUsageDescription description on Info.plist
May I miss some setting after upgrade Xcode from 7 to 8 ??
This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.
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.
You need to put values for the two keys mentioned in your Info.plist file:
NSCalendarsUsageDescription
NSBluetoothPeripheralUsageDescription
e.g. "MyAPP needs access to your calendar for events"
If you do not need/use these capabilities, then there is something in your binary that's triggering Apple's static analyzer.
Check 3rd party libs in your project because some of them have been causing similar issues to this (in your case it may well be AdMob) - some have updated their SDKs to fix it, so make sure you're on the latest version of 3rd party SDKs.
Check the Capabilities section of your App's target configuration - is there anything in there that is unnecessary - particularly in the "Background Modes" section.
I had the same problem, review your info.plist and tries to add the following fields
Privacy - Photo Library Usage Description
or
Bluetooth Sharing - NSBluetoothPeripheralUsageDescription
You can check here the permissions that now requires iOS 10 in its info.plist here: https://blog.xamarin.com/new-ios-10-privacy-permission-settings/
This worked for me.

Resources