Privacy usage description error despite being in info.plist - ios

I'm getting this error in Xcode despite the fact that I have added a description string for NSContactsUsageDescription in info.plist. It's happening in the simulator and on iPad & iPhone.
[access] 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.
I have tried cleaning, rebuilding, deleting the app from the device, restarting Xcode. Deleting from info.plist and adding again. I've also checked the source code for info.plist to see that the key has been added correctly.
I keep getting this error!

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

AppStore BUG: CFBundleIconName in WatchKitApp is missing - but when added the **key** itself is invalid?

We seem to be getting a self-contradictory set of error messages for our iOS App being submitted to the App Store.
The error begins simple enough and says we are missing a plist value. Here's the error below we receive by email from Apple after uploading our app to the store.
Missing Info.plist value - A value for the Info.plist key
'CFBundleIconName' is missing in the bundle
'com.athla.velocity.ultimate.watchkitapp'. Apps built with iOS 11 or
later SDK must supply app icons in an asset catalog and must also
provide a value for this Info.plist key. For more information see
http://help.apple.com/xcode/mac/current/#/dev10510b1f7.
But, if we add this key with its value to the plist file, we get an error saying that the key itself is invalid and we cannot even upload the app to the store. Here is the error:
ERROR ITMS-90363: "Invalid Info.plist key. The key 'CFBundleIconName'
in bundle Velocity Ultimate.app/Watch/Velocity WatchKit App.app is
invalid."
These errors are self-contradictory.
How do we solve this so we can upload our app to the store - but not get blocked for having this key in the plist file?
I just ran into the same set of issues.
In Finder, I opened the WatchKit App Info.plist file in a text editor. I removed the following lines:
<key>CFBundleIconName</key>
<string>AppIcon</string>
After that, the error went away and I was able to upload to App Store Connect.
Hope this helps you out!
I have solved this problem by doubleclick Info.plist -> Visual Assets -> AppIcons. Previously it was "Source: none", so I have selected "Source: AppIcon". I am using Visual Studio making watch app with Xamarin. After that Info.plist was changed from:
<key>XSAppIconAssets</key>
<string>Resources/Images.xcassets/AppIcons.appiconset</string>
to
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
If you remove CFBundleIconName from Info.plist, as suggested by #sulli233, and the error is still there, it might mean that you need to supply an app icon.
In Xcode, click on Assets.xcassets of the project that is failing to build, and supply the necessary images.
In this case, the error message is wrong - it says that the CFBundleIconName is missing, but what is really missing are the images themselves.

Why am I getting an e-mail saying The app's Info.plist must contain an NSPhotoLibraryUsageDescription key when I already do ?

Hi tried to upload my app to Itunes connect , everything was successful (archive etc) but then it didn't appear on iTunes connect, I later got an e-mail saying
"This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data."
However I do have in the info.plist this : Privacy - Camera Usage Description
Where could this come from ? thanks !

This app has crashed because it attempted to access privacy-sensitive data

I have added privacy settings in info.plist still it crashes. I don't why.
It says:
This app has crashed because it attempted to access privacy-sensitive
data without a usage description. The app's Info.plist must contain
an NSMicrophoneUsageDescription key with a string value explaining to
the user how the app uses this data.
Please note that I have already tried re-installing app. I am using iOS 10 Device no simulator.
You can try to reset the simulator and run again. It will work.
Delete NSMicrophoneUsageDescription from plist then run your application in device. Then delete the application from device. then add NSMicrophoneUsageDescription in plist and give description to it(don't keep it empty, write some description!) and install again in device!

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