Geolocation permission request fires twice on native builds fo iOS
Geolocation permission request fires twice on native builds fo iOS
Hi,
in my app I use Ext.Map component, so at the first start of app on IPhone user will get a request for using location permissions. As expected this question should be asked a single time only, but it happened twice.
The first time question is "App would like to use your current location"..
and the second time something like "/var/mobile/Applications/246JF70D-4BB7-736G-870D0VHE1T/app.app/app/index.html would like to use your location"
Yes. You should initialize geolocation services after application DOM is created, for example you can initialize gelocation on "painted" event on Ext.Viewport.
If you use Ext.Map component (uses Ext.util.Geolocation) you should initialize this component with useCurrentLocation config option - false. Important!
Also you should listen for painted event on Ext.Viewport, when this event fires - you can enable geolocation service on Ext.Map by setting mpObj.setUseCurrentLocation(true);