React-native-permissions: Support for new limited access permission to media library (iOS 14)

Created on 3 Sep 2020  ·  2Comments  ·  Source: zoontek/react-native-permissions

Feature request

A new privacy feature in iOS 14 enables users to give an app access to a limited number of photos, instead of having to hand over the keys to their entire photo library.
image

The latest 2.2.0 version of react-native-permissions does not recognize the new PHOTO_LIBRARY permission type, in other words, right now we can not tell if the user granted full access or limited, both scenarios will result in granted status.

Why it is needed

The problem I see: on iOS we ask for permissions only once. So if the user chooses this new option to give access to selected photos (for example gust to try it out) and then does not select any photos, or select only several, we won't be able to determine this and ask again for full access to Photos. The user would need to go to iOS setting and change camera roll permission to “Full Access” for the app.

If we could know that the user has granted limited access to Photo Libary we could react to this scenario.

Possible implementation

Unfortunately, I am not familiar with native development, so I can not offer a solution at the moment, but I found this PR made by the expo team https://github.com/expo/expo/pull/9423

Here is an analogous issue from expo repo for reference: https://github.com/expo/expo/issues/9027

Is the implementation of this feature something, that we could expect before the release os iOS 14?

feature request

Most helpful comment

@mtshv For now, I implemented a naive answer (granted) in the latest version (2.2.2). Discussion for proper implementation is available here: https://github.com/zoontek/react-native-permissions/pull/522

All 2 comments

@mtshv For now, I implemented a naive answer (granted) in the latest version (2.2.2). Discussion for proper implementation is available here: https://github.com/zoontek/react-native-permissions/pull/522

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abakhtiar picture abakhtiar  ·  5Comments

willks picture willks  ·  4Comments

viniciuszim picture viniciuszim  ·  5Comments

vishalTechnoFreek picture vishalTechnoFreek  ·  4Comments

rodrigofbm picture rodrigofbm  ·  3Comments