开发者

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


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

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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜