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:
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?
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.