Mads Mobæk
Mads Mobæk

Reputation: 35940

What are the rules behind "X would like to use your current location" on the iPhone?

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:

Upvotes: 13

Views: 10421

Answers (2)

Bjinse
Bjinse

Reputation: 1359

You can now set or unset for one app in the settings, under General, Location Services. Probably introduced in 4.0?

And if you are a registered developer, you could check the API diffs for the latest beta. They might have improved error handling.

Upvotes: 1

cagreen
cagreen

Reputation: 1625

  1. Yes, it will always ask you twice. Kind of weird and unintuitive imho. It's my understanding that this is in case you hit the wrong button the first time. After that it assumes you know what you wanted.

  2. I found the following in the LocateMe example:

    "Don't Allow" on two successive app launches is the same as saying "never allow". but I've also read that other folks are seeing the same behavior that you are. Maybe a change in recent OS update? Anyways, your approach sounds reasonable.

  3. I don't believe that you can reset for only one app, sorry.

Upvotes: 5

Related Questions