Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Use Current Location Permission dialog is shown twice in Phonegap app

I have a Phonegap app. I am including cordova.js in the HTML (but not in the www directory), I am waiting for deviceready to be fired, and then I'm calling

navigator.geolocation.getCurrentPosition(successCallback,failCallback);

I'm receiving both versions of the dialog (in this order):

Native Dialog - http://i.stack.imgur.com/H5y1O.png
HTML Dialog - http://i.stack.imgur.com/XbcmR.png

like image 857
bendalton Avatar asked Oct 03 '22 20:10

bendalton


1 Answers

If you're using version 3+ of PhoneGap, make sure you're correctly including the plugin.

From the PhoneGap v3.0.0 API Docs :

As of version 3.0, Cordova implements device-level APIs as plugins. Use the CLI's plugin command, described in The Command-line Interface, to add or remove this feature for a project

like image 67
brandonjp Avatar answered Oct 05 '22 23:10

brandonjp