Fixing App Store upload problem with NSPhotoLibraryUsageDescription and PhoneGap Build

Damian
Coding Snippets
Published in
1 min readMar 8, 2017

After submitting an app to the App Store, Apple added a new requirement in iOS 10 related to any apps using the Camera, Bluetooth, Photo Library etc. Apple will email you about the problem when uploading your IPA. Example:

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.Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

When using PhoneGap Build it isn't obvious how to supply these values in your config.xml. So, here is how to do it:

<config-file platform="ios" parent="NSPhotoLibraryUsageDescription" mode="replace">
<string>Allows access to photo library</string>
</config-file>
<config-file platform="ios" parent="NSBluetoothPeripheralUsageDescription" mode="replace">
<string>Allows access to bluetooth devices</string>
</config-file>
<config-file platform="ios" parent="NSCameraUsageDescription" mode="replace">
<string>Allows usage of the camera</string>
</config-file>

--

--

Damian
Coding Snippets

I’m a software architect for my day job and work on a lot of side projects around mobile tech in my free time.