Failed to make IOS6 geolocation-related callbacks

watchposition do not work in iOS6 after the first pair. At startup, it fires once or twice and that it is. After a failure, further watchposition or getposition do not work on callbacks for success or failure.

The job I find is to open the map application, which was introduced in iOS 6, and click the location arrow to find myself. upon waking up, this causes callbacks to be expected every second or so.

UPDATE : if you run maps in navigation, it works great

In addition, it works well while you are outside where the GPS receiver is used.

I sent apples as an error; others please do as well!

Does anyone know a way to encode a workaround?

All I can collect is that the cards perform the initialization procedure to open the API ...

I tried to track watch callbacks and manually run getpostion in the hope that it would restart watchpostion without success ...

UPDATE 10/16/12: a message appears stating that the clock position does not work after the ipad locks / sleeps. when waking watchposition () does not work. noticed that if the safari is minimized and caused by its launch.

UPDATE 11/17/12: error and operation video http://youtu.be/ygprgHh6LxA - Launch IOS6.1 Beta2

UPDATE 12/20/12: IOS6.1 Beta 4 checked - still not allowed.


UPDATE 3/11/13: Replication Example

Well, this is a simple replication problem in just a few seconds. I believe this is not a safari, but an iOS problem. Its almost as if Google wrote a bios for iOS to meet the WC3 html geolocation specification and took it with him when IOS6 kicked them off the bus. Using an iOS device can be found here:

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

Press "Start", the clock should return a result almost every second. Then click the Google link to exit this page. Then return the browser return button. Click "Start." The watch will return 1 to 3 entries and hang. Minimize the safari (home button), and then restore (safari icon); stops hanging

What is it. until it freezes, the problem remains.

Mark

+1
source share
3 answers

My idea: callbacks are called whenever the position changes, therefore, if it does not cause any callbacks. Outside, GPS provides a more accurate position, and it changes for small movements that are not otherwise noticed by other positioning methods.

0
source

Same problem. I added additional optional parameters, but didn’t help ... I tried several things (updated the privacy settings, tried getPosition vs. watchPosition, had cards working in the background. Yup just 3 days ago, my code was perfect, and now it's rubbish .. . :-( Sad days for Apple?

0
source

This problem seems like a real disaster for anyone writing web-based geolocation apps, since iOS devices have such a high market share. Please make sure you submit a bug report to apple at bugreport.apple.com!

Most likely the same problem as (I didn’t have a reputation for posting there): iOS 6 splits GeoLocation into webapps (apple-mobile-web-app-able)

I put together a test page that you can use if you want to investigate this problem:

  • Open http://jsbin.com/esasix/16/ on your iPhone or iPad.
  • Walk on the outside, refresh the page and try another test.
  • See how your position is reported.

I tested myself a lot with the following results:

Tests completed:
Native tests using this simple test page: jsbin.com/esasix/16/
Custom tests with maps.google.com mobileweb map
Native tests using my application
Many logs from external users of my application
Tested using different devices

My findings:

In the same tests, I often get perfect positioning with an accuracy of 5 m, as well as poor reception caused by an error. This means that the device, location, weather, time of day, etc. The same in both situations.

Sometimes after loading the page only one position is returned.
Sometimes after loading a page, several items are returned.
Sometimes a few good positions return, and then the return of positions suddenly stops (sometimes this happens after you have stopped for a while), and it goes into a bad state, maybe returns again, but it is often bad.
Sometimes many positions return with an accuracy of 65 m.
Sometimes many positions return with poor accuracy (usually 50-300 m).
These series of positions with poor accuracy are sometimes close to the series of perfect with an accuracy of 5 m (after it entered a poor state?).
Sometimes everything works fine for many tests in sequence :-)

These behaviors seem to appear in various combinations.

In some situations, re-opening Safari seems to redo something, and it starts working again. However, in some of these situations, he worked only for some time, and in other situations, he did not affect everything so that it could be used as a reliable workflow (?). The same behavior appears when you open the built-in map application, sometimes it helps, sometimes it's not ...

Tested with code that uses navigator.geolocation.watchPosition, as well as code that calls navigator.geolocation.getCurrentPosition in a loop at regular intervals, and it does not matter, in both cases the same problems are visible.

It seems that for iOS version 6.0 - 6.1.2 I do not use the apple-mobile-web-app meta tag.

I found that sometimes individual tests show that a specific behavior appears leading to the conclusions made, but then another test proves that the conclusion is wrong. I have not yet been able to find any behavior (or solution) that is reliably reproducible.

0
source

All Articles