12

I upload my .ipa file completely using application loader but i didn't find the built on Itunes Connect also i receive this message from apple support :"We have discovered one or more issues with your recent delivery for "Update HF". To process your delivery, the following issues must be corrected: 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. "

i add the following codes to config.xml file but i still have the same error:

Ali Beadle
  • 4,486
  • 3
  • 30
  • 55
Ale
  • 161
  • 1
  • 1
  • 3
  • Please show us the edit you made - nothing is currently shown in your question. – Ali Beadle Jan 12 '17 at 11:30
  • I'm not sure what you mean with `config.xml` but there is no such file that Xcode or iTunesConnect looks at. Please see @Rahul's answer, add that in your `info.plist` or `AppName-Info.plist`. – Ramon Jan 12 '17 at 12:07
  • People think you're talking about xcode, not Cordova. I'm looking for an answer as well at the moment. Did you end up figuring this out? – Lydon Jan 24 '17 at 23:04
  • You can refer to this question http://stackoverflow.com/questions/38498275/ios-10-changes-in-asking-permissions-of-camera-microphone-and-photo-library-c – Mr.Thanks Mar 02 '17 at 04:12
  • You can refer to this question http://stackoverflow.com/questions/38498275/ios-10-changes-in-asking-permissions-of-camera-microphone-and-photo-library-c – Mr.Thanks Mar 02 '17 at 04:19

5 Answers5

22

enter image description hereYou can add below lines in your plist.

<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) uses photos</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) uses photos</string>
Rahul Saini
  • 921
  • 2
  • 10
  • 23
  • 3
    maybe I'm being stupid, but you just put up a screenshot of something but didn't explain where to find the thing you're taking a screenshot of. what file are you editing? where do I find it? – Kae Verens Mar 08 '18 at 14:14
  • @KaeVerens this data is in the INFO tab – Broda Noel May 18 '18 at 17:50
  • Note that such a generic description will no longer get you through the appstore approval. You have to actually describe the app's reason for getting access to camera or photos (e.g. to choose your user profile image) – O'Rooney Jan 17 '20 at 01:06
17

EDIT: All core plugins have been updated to not use variables anymore. To set the usage descriptions you have to use edit-config tag in the config.xml like this:

<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
    <string>need camera access to take pictures</string>
</edit-config>

See iOS Quirks section

OLD ANSWER: First remove the cordova-plugin-camera with cordova plugin rm cordova-plugin-camera

And then install it again with:

cordova plugin add cordova-plugin-camera --variable PHOTOLIBRARY_USAGE_DESCRIPTION="your usage message"
jcesarmobile
  • 51,328
  • 11
  • 132
  • 176
  • 2
    @Irvin, this answer is right. I would add this URL https://github.com/apache/cordova-plugin-camera#ios-quirks with the documentation of the camera plugin, it has the other parameter CAMERA_USAGE_DESCRIPTION also. – rubens21 Mar 18 '17 at 13:22
  • This worked for my pohnegap 7.0.1 project, not the other solutions – Piero Alberto May 14 '18 at 06:07
2

In my case App Store Connect kept saying that the key was missing even though it was certainly there. After looking at the Info.plist many times, I finally noticed that the NSPhotoLibraryUsageDescription key had an extra space at the end of the key which, apparently, prevents the upload process from seeing the key.

 Here's a screenshot of the problem and solution:

0

I'm using VS TACO and this is how I finally resolved this issue. Edit the \plugins\fetch.json file so the "cordova-plugin-camera" adding the "variables" section:

"cordova-plugin-camera": {
    "source": {
        "type": "registry",
        "id": "cordova-plugin-camera@~2.4.1"
    },
    "is_top_level": true,
    "variables": {
        "CAMERA_USAGE_DESCRIPTION": "your description text here",
        "PHOTOLIBRARY_USAGE_DESCRIPTION": "your description text here"
    }
}
TechSavvySam
  • 1,382
  • 16
  • 28
0

I encounter the same problem. Try using the below code in your config.xml

<gap:config-file platform="ios" parent="NSPhotoLibraryUsageDescription">

This might be a late response for you but hope this works for people in future.

vishal rana
  • 1
  • 1
  • 1