This issue seems to be a real disaster for anyone writing webbased geolocation applications. Please all make sure you have submitted a bug report to apple at bugreport.apple.com! (I have also submitted a TDS ticket).
Has anyone tested this with iOS 6.1.3 beta?
The discussion here as well as these two SO posts seems to be the same problem:
http://stackoverflow.com/questions/12503815/ios-6-breaks-geolocation-in-webapps- apple-mobile-web-app-capable
http://stackoverflow.com/questions/12553910/ios6-geolocation-watchposition-callb acks-fail
I have put together a testpage that you can use if you want to investigate this problem:
Open http://jsbin.com/esasix/16/ in your iPhone or iPad.
Walk around outside, refresh the page and try other test scenarious.
Watch how your position is being reported.
I have done a lot of testing myself with the following results:
Tests performed:
Own tests using this simple test page: jsbin.com/esasix/16/
Own tests using maps.google.com mobileweb map
Own tests using my application
Many logs from external users of my application
Tested using different devices
My findings:
At the same testsituation I often get perfect positioning regularly with 5m accuracy as well as poor reception caused by the bug. This means that the device, location, weather, time of day etc. is the same in both situations.
Sometimes only one position is returned after loading page.
Sometimes a few positions are returned after loading page.
Sometimes a number of good positions are returned then suddenly it stops returning positions (sometimes this occurs after standing still for a while) and it goes into a bad state, possibly returning positions again but often bad ones.
Sometimes many positions are returned with accuracy 65m.
Sometimes many positions are returned with varying bad accuracy (typically 50-300m).
These series of positions with bad accuracy are sometimes close to series of perfect ones with 5m accuracy (after it has entered the bad state?).
Sometimes everything works fine for many tests in succession...
These behaviours seems to appear in various combinations.
In some situations re-opening Safari seems to re-set something and it starts working again. However, in some of those situations it then only worked for a while and in other situations it had no effect att all so it can be used as a reliable work-around(?). The same behaviour is shown when opening the built in maps application, sometimes it helps, sometimes it does not...
Have tested with code that uses navigator.geolocation.watchPosition as well as code that calls navigator.geolocation.getCurrentPosition in a loop at regular intervalls and it has not made any difference, same type of problems can be seen in both cases.
Seems to occur for iOS version 6.0 to 6.1.2 I am not using the apple-mobile-web-app-capable meta tag.
I have found that sometimes a particular testsituation appears to show a specific behaviour leading to conclusions being made but then another test proves that conclusion wrong. I have not yet been able to find any behaviour (nor solution) that is reliably reproducable.