-
Notifications
You must be signed in to change notification settings - Fork 178
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
Q: Event on success of requestAlwaysAuthorization? #99
Comments
Below is my code around requesting authorization. Seems no matter what, i always get onAuth (success callback) fired as soon as requestAlwaysAuthorization is called. Whether i allow or don't allow, and on subsequent launches when permission doesn't exist. Would be helpful if it called failure/success according to users selection, and if it waited till the user made a selection. Just a suggestion.
|
Well, answered my own question. Hopefully it helps someone else. The success call back from requestAlwaysAuthorization merely says the check for auth succeeded, not that auth was granted. It takes a result, which is an int to indicate state of authentication, so if we see it hasn't been granted yet, we just keep checking after a delay. This repeats until we know if granted or not.
|
This confused the hell out of me too. Thanks for the post. I am having an issue where startMonitoringForRegion will cause the app to crash if permission is not allowed, so will need to work around this using your solution. Cheers, |
It does take and call success/failure callbacks, but appears to fire success simply on the display of the prompt. Whereas I need a callback on accepting of the permission to always monitor beacons.
Problem i'm having is that on first launch of the app, i'm executing the startMonitoringForRegion before the permission has been accepted by user, and then i get:
"Monitor error: The operation couldn’t be completed. (kCLErrorDomain error 4.)"
Whereas i'd like to wait for user acceptance before starting the monitor.
Is there some other way to capture when user has granted monitoring permission?
The text was updated successfully, but these errors were encountered: