NSPhotoLibraryAddUsageDescription required but already in the plist.info - ios

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

Related

App Clip problem after uploading project in App Strore

Hello i am getting an error when i try to upload my project on App Store
error
Invalid Info.plist: The Info.plist may contain either UIMainStoryboardFile or NSMainNibFile,
but it must not contain both keys. For more information, refer to the Information Property List Key Reference.
With error code STATE_ERROR.VALIDATION_ERROR.90147 for id e7bdf8bd-3c1e-4b8b-8d9b-9e5054018f27
I don't see any UIMainStoryboardFile or NSMainNibFile on Info List as i shared the photo
i have any storyboard file also.

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

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!

Privacy usage description error despite being in info.plist

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!

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!

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

My app crashed when I try to open video camera. It is fine when it opens the camera, but when I switch from image to video I get this error:
[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 NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.
I find this weird because I have added the permission in my plist file.
<key>NSCameraUsageDescription</key>
<string>Camera is used to make pictures when creating a job</string>
In your .plist add this key: Privacy - Microphone Usage Description and your desired value.

Resources