in my ionic/angularjs application I use https://github.com/katzer/cordova-plugin-background-mode/ for backgrounding my application.
It's working quiet well on iOS-8 but with the new iOS-9 its not working any more. I did a few tests and it looks like the app is really working in the background but the user gets no information about it. On iOS-8 I get a message like "YourApp is using your location" or something like that on top of the display. On iOS-9 this message is missing.
Did someone the same experience with this plugin?
Thank you for updating the geolocation plugin so that it allows an app to run in the background with iOS 9.
It took me quite a while to get it all working in my Phonegap Build app. It may be helpful to others to see what I needed to include in my config.xml file:
I found out that there are some changes in core location functions on iOS9: allowsBackgroundLocationUpdates in CLLocationManager in iOS9
Like suggested in the post I add a default property allowsBackgroundLocationUpdates with the value YES to the org.apache.cordova.geolocation plugin.
With this fix on CDVLocation.m which is located in
/plugins/org.apache.cordova-geolocation/src/ios/
it now works.To bring it to work I removed platform ios with
cordova platform remove ios
and added it again withcordova platform add ios
back so it builds the plugins new.Now I'm getting the blue bar on the display again :-)
This fix will break the geolocation support on iOS < 9.0. To bring it to work with older versions than 9.0 use this CDVLocation.m file:
The code I changed is marked with: //Edited by kingalione