Using location-awareness on the iPhone triggers the "X would like to use your current location" - "Don't allow"/"OK". In the CLLocationManager documentation, it is stated:
"The user has the option of denying an application’s access to the location service data. During its initial uses by an application, the Core Location framework prompts the user to confirm that using the location service is acceptable. If the user denies the request, the CLLocationManager object reports an appropriate error to its delegate during future requests."
I found the "initial uses" to be two times if you hit "OK" to allow location services. From the third time on, the iPhone will remember your setting for all future uses of the application.
However, a user pressing "Don't allow" will constantly be bothered every time a part of the application tries to uses location services. I've tried at least 15 times in my own app, and have tapped "Don't allow" even more in the "Vancouver 2010 - official mobile spectator guide". This is extremely annoying for users not wanting to use this feature.
My questions:
- For all applications, iPhone will ask two times and remember the setting if you hit "OK". Is this a correct observation?
- Is there a limit on the amount of tries iPhone will continue to ask if you hit "Don't allow", or is this never remembered? How do you handle this? Since locationManager:didFailWithError: is notified, I guess it could increase a counter property each time and persist this. The next time the application is used this setting is checked in my own code. If counter >= 2, don't use core location.
- The only way I found to remove the "OK" setting once remembered, is by resetting it for ALL applications in General -> Reset -> Location warnings. Is there a way to do this only for one application, or from my own code?