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

How to check permission without requesting it ? #92

Open
m0dch3n opened this issue Jun 17, 2019 · 5 comments
Open

How to check permission without requesting it ? #92

m0dch3n opened this issue Jun 17, 2019 · 5 comments

Comments

@m0dch3n
Copy link

m0dch3n commented Jun 17, 2019

Before I used the cordova-plugin-firebase plugin from arnesson, where the following method existed

https://github.com/arnesson/cordova-plugin-firebase/blob/master/docs/API.md#haspermission

How can I do this, with your plugin ? My intent is, to first check if the user has given the permission, and if not, I first want explain why I'll ask for it, before I gonna request...

@fermedina
Copy link

You can do it with Cordova diagnostic plugin

@m0dch3n
Copy link
Author

m0dch3n commented Jun 17, 2019

You can do it with Cordova diagnostic plugin

looks nice, and thanks for the tip!

But maybe this is a little bit an overkill, to integrate a whole plugin with so many features, for just a small check. If I don't need all the rest, this will unnecessary increase the size of my app.

Anyway let's see what @chemerisuk has to say about this ?

@chemerisuk
Copy link
Owner

I don't feel this method is often needed. iOS provides a way to customize text in permission dialog where you can explain why. To show a different kind of screen at the first time - use a persistable flag.

@thwbs
Copy link

thwbs commented Jul 2, 2019

I am currently switching over to this plugin from cordova-plugin-firebase as well, and need this method as part of a complex authentication process on startup. Is there another way to check?

@m0dch3n
Copy link
Author

m0dch3n commented Jul 2, 2019

@WolftechBroadcastSolutions

As I also have local notifications, I used this plugin with the method hasPermission

It better fits my requirements, without bloating the app bundle too much with the diagnostic plugin.

But IMHO it would be better, if cordova-plugin-firebase-messaging would also be able to allow us to check, without requesting for it.

Unfortunately, I don't have any iPhone Dev knowlegde, so I'm unable to implement this natively as proposed by @chemerisuk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants