How to prevent double prompt for geolocation in Phonegap app?

前端 未结 4 1741
悲哀的现实
悲哀的现实 2020-12-30 12:10

I created a PhoneGap app for iPhone that uses geolocation via JavaScript inside webview.

When I run the app the first time, it\'ll prompt me to allow geolocation for

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-30 12:45

    Finally fixed the issue.

    IN the index.html just move your cordova.js up

    as the first js file to be included (especially make sure it is above maps include js). This will make sure that the prompt shows only once

提交回复
热议问题