-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
DENIED~ish permission statuses aren't similar across platforms #230
Comments
Thanks for suggesting this and it's is true that DENIED on ios is that same as DENIED_ALWAYS. It arises historically from earlier versions of this plugin where the constants were separate enums. However, this would be a backwardly-incompatible change that would break the many apps out there which are already using this plugin and its constants as they are currently defined. For this reason, I don't think that making this change is a good idea, given that the workaround needed is fairly trivial:
|
what about creating new non confusing enum names and deprecate old ones keeping deprecated ones long enough for people to switch? I found this plugin to be great help also to hide platform inconsistencies and here even if trivial thats not a nice piece of code... |
Ok, let's address this in the next plugin version |
I propose that DENIED on Android is deprecated in favour of DENIED_ONCE and DENIED on iOS is deprecated in favour of DENIED_ALWAYS which means DENIED_ALWAYS is semantically the same on both platforms. |
During implementation I realised that deprecating DENIED is not possible since it's a return value, therefore this is going to be a hard, breaking change to the API and therefore a major version bump. Brace yourselves! |
It seems that DENIED on ios is that same as DENIED_ALWAYS on android. So, if I wanted to check for this "never can ask again" status and direct the user to their settings page, I would need to check different constants on different platforms.
Proposed changes:
Make both platforms have the same constant for the state where the permission is denied and cannot be prompted again. (DENIED_ALWAYS)
On Android, change DENIED to DENIED_PREVIOUSLY.
The text was updated successfully, but these errors were encountered: