Add privacy description required by iOS 10

This commit is contained in:
Kristiyan Dobrev
2016-08-13 02:19:16 +02:00
parent 111c97fcb6
commit e92a482a90
2 changed files with 18 additions and 0 deletions

View File

@@ -64,6 +64,18 @@ window.imagePicker.getPictures(
// quality of resized image, defaults to 100
quality: int (0-100)
};
### iOS 10 issues
Starting from iOS 10, Apple started asking for specifying the reason for accessing the users photo library, therefore it's mandatory to add `NSPhotoLibraryUsageDescription` entry in the info.plist.
[`NSPhotoLibraryUsageDescription`](https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW17) describes the reason that the app accesses the users photo library. When the system prompts the user to allow access, this string is displayed as part of the dialog box. In order to add this entry you must pass the variable `PHOTO_LIBRARY_USAGE_DESCRIPTION` on plugin install.
Example:
cordova plugin add cordova-plugin-image-picker --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="your message"`
Empty string will be added as value if you dont pass the variable
### Note for Android Use

View File

@@ -22,6 +22,12 @@
<!-- ios -->
<platform name="ios">
<preference name="PHOTO_LIBRARY_USAGE_DESCRIPTION" default=" " />
<config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription ">
<string>$PHOTO_LIBRARY_USAGE_DESCRIPTION</string>
</config-file>
<config-file target="config.xml" parent="/*">
<feature name="ImagePicker">
<param name="ios-package" value="SOSPicker"/>