CB-11661: (ios) Add mandatory iOS 10 privacy description

This commit is contained in:
mhartington 2016-08-11 15:22:39 -04:00 committed by Steve Gill
parent c98607c613
commit a3af38ad5b
2 changed files with 37 additions and 22 deletions

View File

@ -50,6 +50,16 @@ It is also possible to install via repo url directly ( unstable )
cordova plugin add https://github.com/apache/cordova-plugin-camera.git
### iOS Quirks
Since iOS 10 it's mandatory to add a `NSCameraUsageDescription` entry in the info.plist.
`NSCameraUsageDescription` describes the reason that the app accesses the users camera. When the system prompts the user to allow access, this string is displayed as part of the dialog box. To add this entry you can pass the variable `CAMERA_USAGE_DESCRIPTION` on plugin install.
Example:
`cordova plugin add cordova-plugin-camera --variable CAMERA_USAGE_DESCRIPTION="your usage message"`
If you don't pass the variable, the plugin will add an empty string as value.
## How to Contribute

View File

@ -150,6 +150,11 @@
<framework src="CoreGraphics.framework" />
<framework src="AVFoundation.framework" />
<preference name="CAMERA_USAGE_DESCRIPTION" default=" " />
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>$CAMERA_USAGE_DESCRIPTION</string>
</config-file>
<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string></string>
</config-file>