Ionic 2 Background Geolocation


#1

I’m trying to implement the Background Geolocation.watchPosition. I’ve followed Ionic’s docs and tried Josh Morony’s example https://www.joshmorony.com/adding-background-geolocation-to-an-ionic-2-application/ after that didn’t work…both give the same result.

Watching in the foreground with the Geolocation.watchPosition works as it should. Switching to the BackgroundGeolocation.watchPosition doesn’t.
In Xcode it initiates, logs a couple times and then gives the following messages everytime. Is something missing in the documentation. Or has anyone else seen this/similar?

2017-11-03 16:45:18.113439-0500 locationApp[4818:1974560] LocationManager#flushQueue has to kill an out-standing background-task!
2017-11-03 16:45:18:090 locationApp[4818:1972025] LocationManager#flushQueue has to kill an out-standing background-task!
2017-11-03 16:45:18.121987-0500 locationApp[4818:1974560] LocationManager#sync Location: id=-5764607523034234813 time=7583347344 lat=43.06028922092455 lon=-88.3901637979675 accu=10 aaccu=4 speed=0 bear=0 alt=282.5451278686523 type=current
2017-11-03 16:45:18:096 locationApp[4818:1972025] LocationManager#sync Location: id=-5764607523034234813 time=7583347344 lat=43.06028922092455 lon=-88.3901637979675 accu=10 aaccu=4 speed=0 bear=0 alt=282.5451278686523 type=current
2017-11-03 16:45:18:099 locationApp[4818:1974561] CDVBackgroundGeolocation onLocationChanged

iOS 11
node: v7.10.0
"dependencies": {
"@angular/common": “^4.4.6”,
"@angular/compiler": “^4.4.6”,
"@angular/compiler-cli": “^4.4.6”,
"@angular/core": “^4.4.6”,
"@angular/forms": “^4.4.6”,
"@angular/http": “^4.4.6”,
"@angular/platform-browser": “^4.4.6”,
"@angular/platform-browser-dynamic": “^4.4.6”,
"@ionic-native/background-geolocation": “^4.3.3”,
"@ionic-native/core": “^3.14.0”,
"@ionic-native/geolocation": “^3.4.4”,
"@ionic-native/splash-screen": “3.4.2”,
"@ionic-native/status-bar": “3.4.2”,
“cordova-plugin-geolocation”: “^2.4.3”,
“cordova-plugin-mauron85-background-geolocation”: “^2.2.5”,
“firebase”: “^3.7.5”,
“ionic-angular”: “^3.7.1”,
“ionicons”: “3.0.0”,
“moment”: “^2.18.1”,
“rxjs”: “^5.5.2”,
“sw-toolbox”: “3.4.0”,
“twilio”: “2.11.1”,
“typings”: “^2.1.1”,
“zone.js”: “^0.8.17”
},
“devDependencies”: {
"@ionic/app-scripts": “^3.0.0”,
"@types/node": “^7.0.18”,
"@types/twilio": “0.0.8”,
“typescript”: “~2.2.1”
},
“cordovaPlatforms”: [
“ios”,
{
“platform”: “ios”,
“version”: “”,
“locator”: “ios”
}
],
“description”: “locationApp”,
“cordova”: {
“plugins”: {
“cordova-plugin-mauron85-background-geolocation”: {
“ALWAYS_USAGE_DESCRIPTION”: “This app requires background location tracking”
}
},
“platforms”: [
“ios”
]
},