hi, am trying to use the ngcordova geolocation plugin ( watchPosition ) in my ionic ios app. but am keep getting Time Our error ( code 3 ) , the same code works fine on android, i cant see my application in the iphone setting and even i was able to see the application in th esetting before but the privacy option was disabled for the location service for this application, any idea why that ? the code i use is
var onSuccess = function (position) {
console.log("get location OK");
};
function onError(error) {
console.log("get location error " + JSON.stringify(error));
}
navigator.geolocation.getCurrentPosition(onSuccess, onError);
var myoption = {
frequency: 3 * 60 * 1000,
maximumAge: 0,
timeout: 1 * 60 * 1000,
enableHighAccuracy: false
};
var mywatch = navigator.geolocation.watchPosition(function (position) {
var pos;
pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
console.log(pos);
navigator.geolocation.clearWatch(mywatch);
}, function (err) {
console.log(JSON.stringify(err));
navigator.geolocation.clearWatch(mywatch);
}, myoption);
the ios version is 8.0.2, am running the mac os on vmware , the device is connected to and i run using the Xcode run, the application run normaly, but i cant get the location.
update: i tried creating new ionic app for the ios using the maps starter
ionic start maptest maps
and when i run this new app, also the same … geolocation not work !!
any help ??