Apple web-app geolocation on iOS6 is broken

I’ve found a really interesting issue with the iOS6 webapp applications – you just cannot use the getCurrentPosition() function if the app is bookmarked on your homescreen. This function hangs and neither calls the success nor the error callback function.

Seems it’s only the case if your app is in fullscreen mode (bookmarked on your homescreen) so the

<meta content="yes" name="apple-mobile-web-app-capable" />

is present in your html.

Solution?
Remove it.. (lame)
To increase usability you can hide the top safari address bar when the page is loaded. This is what google did for google maps. (Only works on some phones).
Just add this code when the window is loaded:

    window.scrollTo(0, 1);

If I was more suspicious I’d say that it’s the next fuck-you-google-thing.

And follow me!

!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=”//platform.twitter.com/widgets.js”;fjs.parentNode.insertBefore(js,fjs);}}(document,”script”,”twitter-wjs”);

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.