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

iOS requestLocationAuthorization not callBack if I deny current position in popup system message #183

Closed
claudioviola opened this issue Mar 3, 2017 · 5 comments

Comments

@claudioviola
Copy link

claudioviola commented Mar 3, 2017

In iOS 10.2
When my systmes localitazion service is off and I run the app first time a popup system message show me. This popup inform me to Allow current position. If I select "Not Allow", close the app and run again the app, the iOS requestLocationAuthorization is called but not return any callback.

Is it a bug or my fault?
Thank you so much
Claudio

@dpa99c
Copy link
Owner

dpa99c commented Mar 3, 2017

This is intentional behaviour by Apple so apps cannot hassle a user if they refuse a permission.

See dpa99c/cordova-plugin-request-location-accuracy#16

@dpa99c dpa99c closed this as completed Mar 3, 2017
@claudioviola
Copy link
Author

Thank you @dpa99c

I've implemented a timeout. Only in this case after 8sec detach the listner and unblock the app to proceed to use

Thank you again

@Topiya
Copy link

Topiya commented Jun 18, 2019

@claudioviola
Can you please tell me how did you implemented the code that will detach the listner and unblock the app to proceed to use because I have used timeout in my code but getting same issue.

@claudioviola
Copy link
Author

Hey @Topiya sorry have passed 2 years and I'm out from the project
In iOS when in first time access deny the current position, this setting is stored into SETTING screen of the device. Next times access iOS don't show again message to enable current position. This is intentional behavior.

Basically when user deny the first prompt about the request of the current position when the second time that user enter in the app prompt didn't show again and you won't be able to know any feedback from the request of current position, so when you run the current position request you should set a timeout with an expiration after few seconds (I set 8 seconds for that scenario)

If you don't receive any feedback you could take some decision in the user interface.
In my case it was impossible use the a screen of the app without the position so after 8 seconds I disabled that screen overlapping a message like "Current position is not available, this page needs current position"

hope this helps you

@Topiya
Copy link

Topiya commented Jun 18, 2019

@claudioviola Thank you for your prompt response. I will try with your suggestion.

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

3 participants