Geolocation, endless stream of no authorization alerts

You must Login before you can answer or comment on any questions.

Help needed quick, I use this code to get GPS coordinates, it's not that neat but it worked on my device: http://pastie.org/1786359.

Now when installing the app on other devices it shows a endless stream of pop-ups saying the app is not authorized to use locationservices. It shows these pop-ups too fast to click on them. So users have to go to the device settings and enable the Location services for the app there. I hope someone has a definite answer, since I can't test this on my own devices anymore: after you enabled it for the app once you can turn it off again without getting these alerts.

It happens on iOS 4.3.1 4.3 4.2.1 haven't tested older versions.

— asked 2 years ago by J H
0 Comments

1 Answer

Accepted Answer

on line 63 you check to see if the user is allowing access to the geolocation services, but you never exit the path if they say no.

line 157 sets up the listener so that is why I believe you are getting all of the alerts. The listener should not be setup unless the user confirms the use of the location services

— answered 2 years ago by Aaron Saunders
answer permalink
1 Comment
  • Thanks, so the Kitchensink example is misleading, or will creating a dialog like that suffice?
    https://github.com/appcelerator/KitchenSink/blob/099f8b3facffd2d68312a0fa6a9effebed9306e2/Resources/examples/geolocation.js (at line 232)

    — commented 2 years ago by J H

Your Answer

Think you can help? Login to answer this question!