I am not using UIImagePicker in my app and not accessing the Photo Library. I got a mail regarding add NSPhotoLibraryUsageDescription in info.plist file.
I have following questions
How to confirm my project accessing the photo library?
I already searched UIImagePicker in my project and did't get any result.
Is it mandatory to add NSPhotoLibraryUsageDescription in info.plist while i am not accessing the photo library?
Can any one help to find it out .
Thanks
UIImagePicker
An image picker controller manages user interactions and delivers the results of those interactions to a delegate object. The role and appearance of an image picker controller depend on the source type you assign to it before you present it.
whenever you used UIImagePicker, you have to give permission for that particular application
There is a list of all Cocoa Keys that you can specify in your Info.plist file:
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
(Xcode target -> Info -> Custom iOS Target Properties)
iOS already required permissions to access microphone, camera, and media library earlier (iOS6, iOS7), but since iOS10 the apps will crash if you don't provide the description why you are asking for the permission.
UPDATE:
Summary of all privacy keys (with example description):
Useful Link
You only have to add this key-value pair to your info.plist if you are actually accessing the photos any way. If it's not added the app is going to crash.
Check if any of your added dependencies using UIImagePicker.
No it's not mandatory to add NSPhotoLibraryUsageDescription key in info.plist. If your App is not using accessing photo from library/gallery then you should remove it. But as "#Bence Pattogato" said if Your app accessing photo from library/gallery and there is no key added in info.plist then it will be crash.
For your information below are different keys that required to add info.plist if you accessing relevant features according to camera/photo library.
1) NSPhotoLibraryUsageDescription : This key lets you describe the reason your app accesses the user’s photo library. When the system prompts the user to allow access, this string is displayed as part of the alert.
2) NSCameraUsageDescription : describes the reason that the app (including an iMessage app) accesses the device’s camera. When the system prompts the user to allow access, this string is displayed as part of the alert.
3) NSPhotoLibraryAddUsageDescription : (New in iOS 11) This key lets you describe the reason your app seeks write-only access to the user’s photo library. When the system prompts the user to allow access, this string is displayed as part of the alert.
Above information get from this Appel official link.
After adding GPUImage to my Xcode project, my app is getting denied for Missing an Info.plist key for NSCameraUsageDescription.
Missing Info.plist key - This app attempts to access privacy-sensitive
data without a usage description. The app's Info.plist must contain an
NSCameraUsageDescription key with a string value explaining to the
user how the app uses this data.
I have added the key and description to my plist in several different ways and over 10 builds have all gotten the same denial error.
Here is my info.plist with the Camera Usage key at the bottom.
Any ideas on why I still get denied when I clearly have this defined in my plist?
You need to put a particular and proper description to use Camera in your application. One my application is denied due to improper description. So try with a proper description, maybe it will help you.
<key>Privacy - Camera Usage Description</key>
<string>APPNAME requires access to your phone’s camera.</string>
Ok it is an old one but i'd share my experience... nothing was working for me.
What i add to to was :
using Xcode to edit the plist.info. NOT in an external editor !!!!
DO NOT edit the text CREATE a new key using the + sign.
it will ask you to replace the previous (unless the previous one has been entered wrong... my case i think)
Try the both Camera and Library permission in Plist.
<key>NSCameraUsageDescription</key>
<string>Access camera</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Library</string>
I know this is an older post, but for me, it took an hour to discover that I was not editing the correct Info.plist file, but the one for UI Tests. Double-check which one you are editing, it can be the cause.
You should enter the purpose of using camera as the description. If it does not give the purpose app will get rejected.
you should add something like
Appname requires to access camera for taking profile picture or Appname requires to access camera for uploading product images
From the apple: Check this link.
To protect user privacy, an iOS app linked on or after iOS 10.0, and
that accesses the device’s camera, must statically declare the intent
to do so. Include the NSCameraUsageDescription key in your app’s
Info.plist file and provide a purpose string for this key. If your app
attempts to access the device’s camera without a corresponding purpose
string, your app exits.
I got the same error as OP. I don't know why though because I wasn't using anything related to the camera in my app. So I included this as the description and worked.
"AppName does not use the camera to capture to take a profile picture or upload profile photos."
GPUImage is for capturing image and video, i guess adding Microphone permission might solve the issue
<key>NSCameraUsageDescription</key>
<string>Need to access your camera to capture a picture and record a video.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Need to access your microphone to record a video.</string>
try!
<key>NSCameraUsageDescription</key>
<string>Need to access your camera to capture a photo add and update profile picture.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Need to access your photo library to select a photo add and update profile picture</string>
I have the same problem even I add the privacy-Camera Usage Description in the info.plist. I try to clean and rebuild the project. Reopen the Xcode. Everything doesn't work until I add the privacy-Camera Usage Description in the Custom ios Target Properties. Hope it solve your problem.
For app store submission, The Usage description should briefly explain why we really needs that feature.
Description:
Camera Use
is too short and doesn't explains why we actually need camera.
It should be something like:
App Needs to use camera to take Profile picture
If you write
Privacy - Camera Usage Description,
change to
NSCameraUsageDescription
you have to put accurate condition in front of any policy, "camera use" is wrong
here, and for this specific problem you have to put "AVCaptureDeviceInput" in front of privacy. Hope it will work for you.
For more you can go to this link and check other privacy policy as well.
https://developer.apple.com/library/content/qa/qa1937/_index.html
let me know about the result.
Try the following things:
Delete deriveddata
Make sure you are not editing the ones in test folders.
Increase development ios version to 11.0
I get the following 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 NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
Do you know how to fix that?
These are set in the plist for your project. You can add/remove these by navigating to your target info inspector and expanding the "Custom iOS Target Properties" section. For example, one of the entries here in a project of mine is:
Privacy - Camera Usage Description
Allows user to capture a photo or video to upload to their family circle
You can see how this looks here:
You need to go to your Info.plist, add a new row and paste NSPhotoLibraryUsageDescription into the key column. Then in the value column give a description as to why you need to access the user's photo library. Repeat the same step with NSCameraUsageDescription if you intend to use the device's camera.
I'm use phonegap to build ios app, after I tried to submit app via iTunes Connect, I got following message.
**Missing Info.plist key** - 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.
But My app just calling back-end API, I don't use iPhone's Photo Library, I do display html image tag and data is from API.
So is there a setting to disable the usage iPhone Photo Library at Xcode? I'm guessing that could fix my issue.
I want to upload my app to iTunes connect but after uploading I always get an error message by mail from iTunes, that after their scan some description variables are missing.
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.
This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.
I am using both features, so that's ok, BUT: i already added those variables to my localized infoPlist.strings. And these seems to work, because in the Simulator and my iPhone, both strings are displayed correctly in the system dialogs. I didn't add the strings to the plist.info file, because I specified them in the localized file, which should be ok. The plist.info and also the localized file are both packaged in the app, I already head a look using Finder.
Is there anything else I must add? Do I still need to add them to the plist.info file, although they are in the localized file?
Additional info: I am using the latest XCode 8 GM build on macOS Safari.
Are you using AdMob? If so the answer is that Google confirmed that it is an issue with the AdMob SDK. You can read about it here.
The solution is, to add the keys also to the PList.info file, not only to the localized infoPlist.strings file.
This is a bit inconsequent because within the simulator and on my phone every message is displayed correctly. But now my app was accepted.