1

The watchposition callbacks are not firing in IOS6 after first couple. On start it fires once or twice and that's it. Once failed, further calls of the watchposition or getposition do not fire success or failure callbacks.

The work around I am finding is to open the maps app that was introduced in IOS 6 and tap the location arrow to find yourself. after trying this the callbacks fire as expected every second or so.

UPDATE: if you run maps in navigation it works great

Also, it appears to stay running well as long as you are outside where the GPS receiver is being used.

I submitted as bug to apple; others please do as well!!

Anyone know of a way to code a workaround?

All I can gather is maps is performing an initialize routine to open the API...

I have tried to watchdog the watch callbacks and manually fire getpostion hoping it would restart the watchpostion without success...

UPDATE 10/16/12: appears the watch position fails after ipad locks/sleeps. when awakened the watchposition() does not fire. noticed if safari is minimized and recalled it starts firing.

UPDATE 11/17/12: video of bug and work around http://youtu.be/ygprgHh6LxA - Running IOS6.1 Beta2

UPDATE 12/20/12: IOS6.1 Beta 4 tested - still not resolved.


UPDATE 3/11/13: Replicate example

Okay, it is a simple issue to replicate in just a few seconds. I feel it is not a safari, but an IOS issue. It’s almost as if Google wrote the bios for the IOS to meet the WC3 html geo location spec and took it with them when IOS6 kicked them off the bus. Using an IOS device go here:

http://uc.myaesc.com/geoloctestorig.htm

Click start, watch should return result almost every second. Then click the Google link to leave this page. Then user browser back button to return Click start. Watch will return 1 to 3 records and hang. Minimize safari (home button) and then restore (safari icon); stops hanging

That's it. until it does not hang, the issue remains.

Mark

MarkM
  • 87
  • 7

3 Answers3

0

My idea: callbacks are invoked whenever the position changes, so if it doesn't you get no callbacks. Outside, GPS gives more accurate position and it changes for smaller movements that otherwise aren't noticed by other positioning methods.

pronvit
  • 4,169
  • 1
  • 18
  • 27
0

Same issue. I added extra optional parameters with no avail... tried a few things (updated privacy settings, tried a getPosition vs. watchPosition, had maps running in background. Yup just 3 days ago my code was perfect, and now, it is garbage... :-( Sad days for Apple?

chalupien
  • 1
  • 1
0

This issue seems to be a real disaster for anyone writing webbased geolocation applications since iOS devices have such a high market share. Please all make sure you have submitted a bug report to apple at bugreport.apple.com!

Most likely the same problem as (I did not have enough reputation to post there): iOS 6 breaks GeoLocation in webapps (apple-mobile-web-app-capable)

I have put together a testpage that you can use if you want to investigate this problem:

  1. Open http://jsbin.com/esasix/16/ in your iPhone or iPad.
  2. Walk around outside, refresh the page and try other test scenarious.
  3. 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 a 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.

Community
  • 1
  • 1
Fred
  • 1
  • Has anyone tested this with iOS 6.1.3 beta? – Fred Mar 08 '13 at 17:05
  • For all of you interested in this bug, I am also reporting about my experiences of this at https://discussions.apple.com/thread/4313850?start=60&tstart=0 (since I do not yet have enough reputation to write comments and include photos on SO) – Fred Mar 13 '13 at 19:52
  • Not fixed in iOS 6.1.3. See https://discussions.apple.com/thread/4313850?start=60&tstart=0 – Fred Mar 25 '13 at 10:40