Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Location service iOS alert call back

When we use location services in an application, we receive an iOS alert saying the application is trying to use the current location -- Allow/Don't Allow.

Do we have a delegate call back for these buttons?

I want to handle tap on "Don't Allow".

like image 834
Abhinav Avatar asked May 06 '11 01:05

Abhinav


1 Answers

You don't have direct access to that alert.

If the user presses "Don't Allow", or if the app otherwise doesn't have permission to use location services then CLLocationManager will call locationManager:didFailWithError: on its delegate. The error domain will be kCLErrorDomain and the error code will be kCLErrorDenied.

like image 159
Darren Avatar answered Sep 22 '22 03:09

Darren