Skip to content

Commit

Permalink
Merge pull request #1 from wymsee/master
Browse files Browse the repository at this point in the history
  • Loading branch information
sbatezat authored Jun 7, 2017
2 parents cba8b27 + f3e414d commit 5d9e200
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 user’s 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 user’s 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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-image-picker",
"version": "1.1.1",
"version": "1.1.3",
"description": "This plugin allows selection of multiple images from the camera roll / gallery in a phonegap app",
"cordova": {
"id": "cordova-plugin-image-picker",
Expand Down
4 changes: 4 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

<!-- 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"/>
Expand Down

0 comments on commit 5d9e200

Please sign in to comment.