1

My app can have two level of LocationHandler status. First, I launch requestWhenInUseAuthorization and then, if the user activates some specific features, I launch requestAlwaysAuthorization.

I need to be notified if user refuses the requestAlwaysAuthorization to let him know the feature won't work as expected. The problem is that in this case didChangeAuthorizationStatus is not called because the authorization status stays the same (it was AuthorizedWhenInUse and it's still AuthorizedWhenInUse).

Do you have any idea how I could be notified if user refuses AuthorizedAlways after accepting AuthorizedWhenInUse ?

CedricSoubrie
  • 6,657
  • 2
  • 39
  • 44

1 Answers1

4

since iOS 10 or so it is no longer possible to call requestAlwaysAuthorization() after you have called requestWhenInUseAuthorization() even if the user accepted when-in-use.

in prior versions (at least iOS8) you could "step up" the authorization and ask for always-authorization after the user accepted when-in-use. This is no longer possible.

best thing to do is check CLLocationManager.authorizationStatus() once in a while and show a dialog pointing the user to the right settings page with UIApplicationOpenSettingsURLString

woens
  • 1,058
  • 9
  • 20