Xcode: Missing Info.plist key for NSCameraUsageDescription

╄→尐↘猪︶ㄣ 提交于 2019-12-21 09:29:14

问题


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?


回答1:


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>



回答2:


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)




回答3:


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.




回答4:


Try the both Camera and Library permission in Plist.

<key>NSCameraUsageDescription</key>
<string>Access camera</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Library</string>



回答5:


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>



回答6:


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.




回答7:


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




回答8:


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




回答9:


If you write Privacy - Camera Usage Description,

change to NSCameraUsageDescription




回答10:


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.



来源:https://stackoverflow.com/questions/44690075/xcode-missing-info-plist-key-for-nscamerausagedescription

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!