Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to tell an iOS device to stop remembering / forget location services preference for a specific app

I want to test the behavior of a "first-time" app install with regard to location services. The problem is, my iPhone 4 Settings app "remembers" my app's location services preference, even after I uninstall the app and power cycle the phone.

Here's what I tried:

Open Settings.app - notice that loc services are currently OFF for my app Uninstall app Power cycle phone Open Settings.app - saw that the app was not in the list Build/run my app

Then I received a "general error" when trying to check for location services:

Error Domain=kCLErrorDomain Code=1 "The operation couldn’t be completed. (kCLErrorDomain error 1.)

So I went back into Settings.app and saw that my app was now there, turned off.

I believe error code 1 is kCLErrorDenied, correct?

Does anyone know of a way to test as a "fresh" app install? I'd rather not reinstall the OS or have to buy a new device each time. :)

Thanks!

Update: Also, as posted in my comment below, it's possible to do this by resetting ALL location warning dialogues (for all apps) by going to Settings.app -> General -> Reset (way at the bottom) -> Reset Location Warnings

like image 372
taber Avatar asked Mar 25 '11 19:03

taber


2 Answers

Taber needs to get the credit or this - his answer helped me big time.

Settings.app -> General -> Reset -> Reset Location Warnings

like image 188
karlbecker_com Avatar answered Oct 13 '22 10:10

karlbecker_com


The only way I know of (besides wiping the device) is to put a new bundle identifier on your app.

like image 44
Anomie Avatar answered Oct 13 '22 10:10

Anomie