Usage Descriptions for Plugins

Description

Usage descriptions can be added to the PhoneGap config file, which can be used to add xml directly to the iOS Info.plist file and Android AndroidManifest.xml files.

Discussion

PhoneGap build allows the addition of a <config-file> element in the config.xml file. This lets you add xml directly to the iOS Info.plist file and Android AndroidManifest.xml file. (See PhoneGap Modifying Manifests.)

This solves an error that you might get when submitting an app to the Apple App Store. The error complains about certain UsageDescription strings not being set in PhoneGap Build Plugins.

For example:

Camera Plugin : NSCameraUsageDescription
Calendar Plugin : NSCalendarsUsageDescription
PhoneGap Build is no longer available from Adobe.

The entry into the config.xml file to set the UsageDescription strings is:

<config-file platform="ios" parent="NSCalendarsUsageDescription" mode="replace">
    <string>This app will use the Calendar</string>
</config-file>