1

I am using location services in my application. When I run the application with location services ON, everything is perfect. But, if I turn the Location services OFF globally, and come back to the app. It gives me a pop up saying "Turn on Location services to allow to determine your location" with two buttons "Settings" and "Cancel".

If I tap on Settings, it takes me to Settings app (as expected). But If I tap on "Cancel" nothing happens. My app can't get the event and it freezes, waiting for something to happen. If I fire some other event after that, which uses current location, then it gets authorisation failed, and app becomes normal.

To handle this behaviour I want to detect the touch event on "Cancel" button. Is there any way to do that. Because I think this pop is handled by OS and not the SDK.

Correct me if I am wrong.

Pravara Patil
  • 513
  • 1
  • 3
  • 10

1 Answers1

0

This is where to detect the touch event on "Cancel" button:

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error{

}

Probably, Your implementation of it, causes the freezes (And not the iOS). Try and use this empty implementation just to make sure...

Mute Dan
  • 428
  • 2
  • 14