How to resolve “Missing Info.plist key … NSPhotoLibraryUsageDescription”

前端 未结 5 1631
误落风尘
误落风尘 2020-12-31 09:17

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

相关标签:
5条回答
  • 2020-12-31 09:45

    You 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>
    
    0 讨论(0)
  • 2020-12-31 09:46

    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.

    0 讨论(0)
  • 2020-12-31 09:51

    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.

    0 讨论(0)
  • 2020-12-31 10:08

    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"
    
    0 讨论(0)
  • 2020-12-31 10:08

    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"
        }
    }
    
    0 讨论(0)
提交回复
热议问题