Location services in mobile Safari: Don't Allow is saved...forever? Even with reset

Axel picture Axel · May 3, 2012 · Viewed 55.2k times · Source

My web app using location services worked fine until I started testing "Do not allow" use cases. Now an iPhone refuses to ever allow location services, even when I answer "OK" to "Safari" would like to use your current location.

To reproduce... Using iPhone on iOS 5.1:

  1. Load web page that makes location services calls (like http://smithsrus.com/geo.html)
  2. Answer "Do not allow" when user permission prompt appears.
  3. Reload page and answer "Do not allow" 2 more times.
  4. Reload page and see "User Denied" without getting a prompt.
  5. Go to "Settings->General->Reset->Reset Location Warnings" and tap "Reset Warnings".
  6. Return to Safari, reload page and now see the user permission prompt.
  7. Even if you answer "OK" the web page will still be Denied.

I kill and restart Safari, I delete all website data, I turn Location Services on and off, I even reboot, and still Safari refuses to actually Allow location services even when I say I want to.

Once you go through these steps, that web domain is dead to location services. I'm running out of domains to test

I've searched many StackOverflow, Apple Developer and other sites for answers. But it sure looks like a bug to me. Answering a prompt with "Allow" but getting denied must be a bug. After answering "Allow" the location services icon appears at the top of the screen briefly but then disappears, and in Location Services settings Safari appears with "On" and the gray icon next to it.

After trying a combination of reseting location warnings, turning on and off location services and closing and restarting the browser, I did manage to get one new error:
"The operation couldn't be completed. (kCLErrorDomain error 1.)" Sounds buggy.

I'd rather it be something silly I am doing, can anyone tell me?

Answer

Mark picture Mark · Jan 21, 2013

I got it after about giving up and thinking there wasn't a solution. I managed to share my location on my iPhone 4s by doing the following:

Go to Settings -> General, scroll to the bottom and go to Reset-> Reset Location & Privacy.

The next time I opened my web-app to test its user location features, it worked like a charm. Hope this helps for all who have this problem.