Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0: iOS 14 and Android 11 support #522

Merged
merged 66 commits into from
Nov 28, 2020
Merged

3.0.0: iOS 14 and Android 11 support #522

merged 66 commits into from
Nov 28, 2020

Conversation

zoontek
Copy link
Owner

@zoontek zoontek commented Sep 26, 2020

Hi everyone 👋

As you all know, a few days ago Apple released iOS 14, and Google Android 11. This versions came with various permissions changes:

On iOS

On Android

TODO

  • Support asking for full location accuracy on iOS
  • Support PHOTO_LIBRARY_ADD_ONLY
  • Support the new Limited status for PhotoLibrary permission
  • Support the new Ephemeral status for Notifications permission (+ the Provisional status)
  • Drop iOS 9 support
  • Support Android location permission changes
  • Support Ask every time feature on Android
  • Update example project
  • Update documentation
  • Update Jest mock
  • Write a migration guide

More…? (I might be missing several things)

@zoontek zoontek added help wanted Extra attention is needed pinned This require special attention labels Sep 26, 2020
@zoontek
Copy link
Owner Author

zoontek commented Nov 1, 2020

I published a first version: https://www.npmjs.com/package/react-native-permissions/v/3.0.0-beta.0
The migration guide is available here: https://github.com/zoontek/react-native-permissions/blob/3.0.0/MIGRATION.md

zoontek and others added 7 commits November 6, 2020 13:29
If you have multiple ViewControllers nested, the prompt for the LimitedLibraryPicker will not prompt on the right viewcontroller, which makes nothing actually happen.

Added a quick cycler to go through the tree until it finds the top most view controller.
As pointed out by Zoontek, there is a function to find the top view controller in React Native. Importing that function, and then updated the topViewController to use that function.
Fix LimitedLibraryPicker not popping up.
@zoontek
Copy link
Owner Author

zoontek commented Nov 14, 2020

Second beta is available: https://www.npmjs.com/package/react-native-permissions/v/3.0.0-beta.1
It includes this fix, by @princekurt

@zoontek zoontek changed the title WIP: 3.0.0: iOS 14 and Android 11 support 3.0.0: iOS 14 and Android 11 support Nov 28, 2020
@zoontek zoontek merged commit 08e8af9 into master Nov 28, 2020
@zoontek zoontek deleted the 3.0.0 branch November 28, 2020 10:15
@matamicen
Copy link

Hi guys, first of all thanks for this SuperLibrary :)

I am confused, may be you can help me out.

My App is targetSdkVersion = 29 and Google Console is telling us: Play Store Warning “Starting May 5th you must let us know why your app requires broad storage access”

And I have this in my manifest.xml:

  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

and
android:requestLegacyExternalStorage="true"

and I have this version in my project: "react-native-permissions": "^2.2.2"

So What do you recommend me to do?

  1. Installing just "react-native-permissions": "3.0.2" will solve this google play console message?

  2. Do I need to target to sdk 30 and add and also install "react-native-permissions": "3.0.2" ?

  3. other approach?

Thanks @zoontek and @mikehardy :)

Matt.

@mikehardy
Copy link

There is lots of documentation on the google site about how to manage the transtition on that permission, and what you need to do going forward. It's far out of scope for this repository - it's a very involved subject.

You must educate yourself: https://developer.android.com/about/versions/11/privacy/storage#scoped-storage

@matamicen
Copy link

Yes @mikehardy you are all right. Sorry to ask here, it is out of scope.

The thing is I migrate to API 30 and everything is working in the APP and I didn't upgrade to react-native-permissions": "3.0.0" ... I am still using 2.2.2 and it saves videos to the external storage in Android 11 with the version 2.2.2 permission without any problem. Do I miss something?

Sorry & Thanks again!
Matt.

@mikehardy
Copy link

You must read the documents

The library asks the permission the same. The permission is the same name. The platform is ignoring a flag on 11. The review will disallow it soon unless your app actually needs it. All in the docs.

@matamicen
Copy link

Thanks @mikehardy :)

@ghost
Copy link

ghost commented Apr 28, 2021

@matamicen did you find any solution for this ?
Please share with me.
For non English speaker it is a little hard to understand what actually google want and what to do before may 5

@tungduonghgg123
Copy link

tungduonghgg123 commented Sep 15, 2021

Hi guys, are we planning on crossing out the last two items on TODO list? @zoontek

@zoontek
Copy link
Owner Author

zoontek commented Sep 15, 2021

@tungduonghgg123 Supporting Ask next time feature is currently not possible on Android as the OS permission system is broken.

The choice has been made to fix this issue instead: facebook/react-native#30158 (read the comments), which was considered more problematic then supporting "Ask next time". If Google fix Android one day, we will remove the SharedPreferences and support it.

@satya-imaginea
Copy link

I am using "react-native-permissions": "^3.2.0", but still getting RESULT.BLOCKED status in android device if I select "Ask every time"

@zoontek
Copy link
Owner Author

zoontek commented Feb 1, 2022

@satya-imaginea It can't be done because of facebook/react-native#30158. Android permission system is currently broken.

@satya-imaginea
Copy link

@satya-imaginea It can't be done because of facebook/react-native#30158. Android permission system is currently broken.

thank you for the quick update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed pinned This require special attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants