Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 477
Axel Avatar asked May 02 '12 22:05

Axel


People also ask

How do I reset my Safari Location?

Open the Privacy menu and choose the Location Services sub-menu. Enable the Location Services toggle. Scroll down on the Location Services page, and select the Safari app from the list. Choose the appropriate desired option from – Never, Ask Next Time, or While Using the App.

How do I stop Safari from showing my Location?

How to stop websites asking for location access in Safari. Head to Settings > Safari. Now go down the list and select Location. Choose Deny to prevent location access.

How do I remove Location from iPhone Safari?

Scroll down and select “Safari.” Scroll down till you see the “Settings For Websites” section. Tap on “Location” in there. Select “Deny.”

How do I allow Safari to use my Location on iPhone?

Open the Settings app, then scroll down to Privacy, then here, select Location Services. Scroll down until you see “Safari Websites” and tap the icon. Here, under “Allow Location Access” you can choose from three options. The “Never” option will never share your location.


2 Answers

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.

like image 188
Mark Avatar answered Oct 12 '22 22:10

Mark


The following steps solved it for me:

  1. Close all tabs in safari with the domain in question open.
  2. Close Safari (Hold home button and cross off).
  3. Settings -> General -> Reset -> Reset Location Warnings / Reset Location & Privacy.
  4. Open Safari and try again.

The trick (compared to mark's answer) is to make sure you close Safari fully. When I followed mark's answer, I got the prompt re-appearing for Safari itself, but not for my domain. After closing Safari then following mark's answer, I got 2 successive prompts, firstly for Safari, and then for my domain.

like image 27
Tyson Avatar answered Oct 12 '22 22:10

Tyson