I'm writing an app which relies on location services.
I need to emit a warning if the user refuses to enable it and request to enable it again and so on.
You can use the locationServicesEnabled method to check if it's enabled. If not, you can alert user about it. If it's not enabled, and you go ahead and call startUpdatingLocation anyway, the user will be prompted to enable it. If the user enables it, good. If the user doesn't enable it, the delegate method should get the didFailWithError message, so you would know.
Each time i do startUpdatingLocation it requests an approval from the user right?
So I can loop this way:
1- startUpdatingLocation
2- handle error on the delegate object doing startUpdatingLocation again and so on
Do you think it's right?
Thx
Massimo
Quote:
Originally Posted by kelvinkao
You can use the locationServicesEnabled method to check if it's enabled. If not, you can alert user about it. If it's not enabled, and you go ahead and call startUpdatingLocation anyway, the user will be prompted to enable it. If the user enables it, good. If the user doesn't enable it, the delegate method should get the didFailWithError message, so you would know.