Skip to content

Commit e625483

Browse files
chore(update-plugins): Sun Feb 11 13:48:08 UTC 2024
1 parent b717011 commit e625483

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

content/plugins/imagepicker.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ Install the plugin by running the following command in the root directory of you
4040
npm install @nativescript/imagepicker
4141
```
4242

43+
**Note: Version 3.1 contains breaking changes:**
44+
45+
- New behavior on iOS when the user selects `Limit AccessLim..` detailed in [iOS Limited permission](#ios-limited-permission).
46+
4347
**Note: Version 3.0 contains breaking changes:**
4448

4549
- authorize() now returns a `Promise<AuthorizationResult>` for both android and ios.
@@ -83,6 +87,21 @@ Using the plugin on iOS requires the `NSPhotoLibraryUsageDescription` permission
8387

8488
Apple App Store might reject your app if you do not describe why you need this permission. The default message `Requires access to photo library.` might not be enough for the App Store reviewers.
8589

90+
### iOS Limited permission
91+
92+
Apple introduced the `PHAuthorizationStatusLimited` permission status with iOS 14, this is where the user specifies that the app can only access specified photos by choosing the `Limit Access..` option in the authorization dialog.
93+
94+
In this case `authorise()` will return an `AuthorizationResult` where `authorized` will be `true` and the `details` will contain `'limited'`.
95+
96+
Every time the app is launched anew, and the authorize method is called, if the current permission is `limited` the user will be prompted to update the image selection.
97+
98+
To prevent this prompt, add the following values to your `App_Resources/iOS/Info.plist`:
99+
100+
```xml
101+
<key>PHPhotoLibraryPreventAutomaticLimitedAccessAlert</key>
102+
<true/>
103+
```
104+
86105
## Pick images
87106

88107
To pick images (and/or videos) with the plugin, take the steps below:

0 commit comments

Comments
 (0)