I have developed an Ionic 2 application. When I try to upload it to the Apple store they reject it with the 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.
I added the NSPhotoLibraryUsageDescription
key in config.xml
<plugin name="cordova-plugin-camera" spec="https://github.com/apache/cordova-plugin-camera">
<variable name="CAMERA_USAGE_DESCRIPTION" value="App would like to access the camera." />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="App would like to access the library." />
</plugin>
But still they rejected the app with same message. Do I need to add this key in all the plugin variables? I mean I have used image-picker plugin also. Do I need to add this key in this plugin also? I have added that but still they rejected with same error.
Something that worked for me was changing the config.xml
<platform name="ios">
<config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
<string>You can upload your profile picture using your Photo Library</string>
</config-file>
<config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
<string>You can upload your profile picture using your camera</string>
</config-file>
There is two types of info.plist available for Photolibrary.
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="App would like to access the library." />
<variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value="App would like to access the library." />
Maybe you did not add the second variable in the corresponding plugin. Please add that too. Hopefully it will work.
in platform ios insert the code:
<platform name="ios">
<preference name="CAMERA_USAGE_DESCRIPTION" default=" "/>
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>$CAMERA_USAGE_DESCRIPTION</string>
</config-file>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With