Reputation: 683
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.
Upvotes: 5
Views: 6666
Reputation: 2490
I faced the same issue few days earlier for my IONIC 4 Project. when i uploaded my IPA, i got this warnings from App Store Connect.
I fixed the "Missing Purpose String in info.plist" issue, by the following steps. hope it will also work for you.
Thanks.
Upvotes: 0
Reputation: 21
Open info.plist in xcode as source code.
Add this lines:
<string>need photo library access to save pictures there</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Need Gallery access to use photos for ads posting.</string>
Change the text inside to the correct text, why you need to get the access to photo library and camera.
This should work and you will get approval from Apple team too
Upvotes: 0
Reputation: 158
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>
Upvotes: 3
Reputation: 54
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.
Upvotes: 3
Reputation:
Apple's review team and their validation checks whether your file is safe or not. So you need to add description on those lines in your Info.plist
file.
Like I have done the following:
Upvotes: 2
Reputation: 1480
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>
Upvotes: 18