Xcode: Missing Info.plist key for NSCameraUsageDescription

落花浮王杯 提交于 2019-12-04 05:51:23

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)

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.

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 the both Camera and Library permission in Plist.

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

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

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.

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.

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