Hello guys,
I’ve just migrated to XCode 6, and have installed the iOS simulator via brew: brew install ios-sim, it installed the latest iOS emulator version (Version 8.1 (550.3)) of course, and everything was working well until I tested a part of my app that’s using Cordova GeoLocation (via ng-cordova), I’m doing it like this (and it used to work with the older emulator):
$ionicLoading.show();
$cordovaGeolocation.getCurrentPosition()
.then(function(position) {
var coordinates = {
latitude: position.coords.latitude,
longitude: position.coords.longitude
};
return coordinates;
}, function(err) {
//ERROR
console.log('Cordova GeoLocation Error ocurred');
}).then(function(coordinates) {
SearchService.do(term, coordinates, 1).then(function(results) {
$ionicLoading.hide();
//do something with search results
});
});
Since I’m using $ionicLoading right before I trigger GeoLocation the resulting effect is that the Loading screen never fades away (because the Cordova GeoLocation plugin isn’t working…).
I understand I should even get a request/pop-up for “Allow Location Services to use my location, etc, etc”, but that doesn’t get triggered. The log in /platforms/ios/cordova/console.log doesn’t have any useful information after running either.
Can anyone please help me getting Cordova GeoLocation to work?
Thanks in advance!
-J