如何更改PhoneGap應用程序的權限?我希望應用訪問用戶的GPS。但是,當我使用build.phonegap.com我檢索應用程序時,並不真正知道如何執行此操作。該應用程序從不要求使用我的位置的權限。相反,我手動把它,但我仍然得到錯誤代碼「權限被拒絕」。Phonegap GPS權限
iPhone 5S iOS8上, org.apache.cordova.geolocation 0.3.10, 的PhoneGap 3.5
document.addEventListener("deviceready", onDeviceReadyGeo, false);
function onDeviceReadyGeo() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, onError, {timeout:10000});
} else {
error('Geo Location is not supported');
}
}