question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Background Geolocation does not work under iOS

See original GitHub issue

I am using Ionic framework to develop my app, I’ve followed the documentation, everything works fine on Android; however on iOS it shows the blue bar that says that the app is tracking the current location on the background (only for the first 40 seconds), then that blue bar disappears and the app stop tracking the current location.

Your Environment

  • Plugin version: cordova-plugin-mauron85-background-geolocation 2.2.5 “CDVBackgroundGeolocation”
  • Platform: iOS
  • OS version: iOS 10
  • Device manufacturer / model: iPhone 6
  • Cordova version (cordova -v): 7.0.1
  • Cordova platform version (cordova platform ls): ios 4.4.0
  • Plugin config

Expected Behavior

It should track the user current location in iOS even if the app goes to the background.

Actual Behavior

When going to the background, it shows the blue bar that says that the app is taking the current location on the background (only for the first 40 seconds), then that blue bar disappears and stop tracking the current location.

On the other hand, I have the same code working perfectly on Android devices, so I guess that there is an issue with the iOS.

Steps to Reproduce

Just follow the documentation on the following link : https://ionicframework.com/docs/native/background-geolocation/

Then run the app under iOS

Context

Track drivers location and update the database of the current driver location each 10 seconds.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:19 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
arapocketcommented, Aug 27, 2017

Same problem. Other people have been having running into the same issue as well.

1reaction
CharlieIGGcommented, Aug 13, 2018

Can anyone please validate this does work as expected with v3?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Background Geolocation does not work under iOS · Issue #444
I've solved it by accessing to the app settings and checked "Always" to enable background tracking even if the app is in the...
Read more >
cordova-plugin-mauron85-background-geolocation does not ...
I presume you are testing on iOS 11. As noted in this issue, the current version of this plugin does not work in...
Read more >
BackgroundGeolocation | Cordova Background Geolocation
When performing a onMotionChange or getCurrentPosition, the plugin requests multiple location samples in order to record the most accurate location possible.
Read more >
cordova-background-geolocation-lt - npm
The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android ...
Read more >
React Native Background Geolocation - Transistor Software
When your iOS app isn't currently requesting continuous location-updates, iOS will immediately put your app to sleep. However, the iOS Background Geolocation ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found