iOS 4.3 Geolocation in web apps

Update: problem solved(ish)! See below...

Not again you Apple monsters! Last time it was multi touch that you decided to take from us, this time it's geolocation. Upgrading my iPhone 3GS to iOS4.3 caused a mobile web app I'm working on to start throwing errors. Danged if I can figure out why. Here's what I know so far...

Calling navigator.geolocation.getCurrentPosition in mobile safari works fine - returning a normal position object. However, when added to the home screen and run as fullscreen app (using the apple-mobile-web-app-capable meta tag) it would not ask for permission to access geo features, but immediately fail returning the error:

Permission error; The operation couldn't be completed. (kCLErrorDomain error 1.)

Looks like a permission error to my professional eye. But why? Dunno. I made this test app, called "Geoful". If you could have a go and report back I'd be most grateful.

Here's some reports so far. Seems to follow no logic, which makes for exciting bug hunting...

Device  Firmware  Browser  Fullscreen
-------------------------------------
   4      4.3      works     works
   4      4.3      failz     works
  3GS    4.2.0     works     works
  3GS    4.2.1     works     works
  3GS     4.3      works     failz
  3GS     4.3      failz     works
  3GS     4.3      works     failz
 iPad1    4.3      works     works


Update 1: If it failz for you in teh web browser, try turning on "location services" in preferences for Sarari.

Update 2: Ok, here's the deal: if it's failing for you, got to Preferences -> General -> Reset -> Reset Location Warnings.
The next time you run the app it will requests permission and works as expected.

Interestingly, if I now say "no" when asked for permission the error returned is not the same one as I was getting earlier:

Permission error; User denied Geolocation

A bit more helpful than the old message I think you'll agree! I'm also not sure exactly where my app got "disallowed" - but it seems like the update to 4.3 defaulted it to "no permission". Though I'm not going to rule out "stupid user error", so I won't put this in the bug category jussst yet.