关闭ios弹出框:“would like to use your current location”时间:2023-03-09 12:59:45 图一: 图二: 使用cordova生成ios项目,首次打开获取用户定位时会弹出两次对话框,关闭图二中对话框方法: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { navigator.geolocation.getCurrentPosition(onSuccess, onError); } 参考:Location permission alert on iPhone with PhoneGap