Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help Wanted]: iOS not working properly when app is killed #1453

Open
2 of 3 tasks
mattiagualtieri opened this issue Mar 19, 2025 · 1 comment
Open
2 of 3 tasks

[Help Wanted]: iOS not working properly when app is killed #1453

mattiagualtieri opened this issue Mar 19, 2025 · 1 comment

Comments

@mattiagualtieri
Copy link

Required Reading

  • Confirmed

Plugin Version

4.16.9

Mobile operating-system(s)

  • iOS
  • Android

What do you require assistance about?

I'm trying to emulate the behavior of the example app in my application. In an Android physical phone, everything is working as expected.
Using an iOS phone (iPhone X, quite old), I see that the example application is kinda working, while my application is not working properly. Indeed, the example app tracks my movements even when the app is killed, pushing my position to https://tracker.transistorsoft.com correctly.
My app instead stops tracking, or doesn't track at all in some experiments.

I made an accurate comparison between the two behaviors (you can find the logs from .emailLog attached). In this experiment, I started tracking at ~22:30 and made some relevant movements (>300mt) at ~8:30, ~13:00 and ~18:30. The example app seems to be able to track all those relevant movements, while my app tracked only the first at ~8:30.

Note that the plugin configuration is the same. What could be the cause of this bad behavior?

example-app.log
my-app.log

[Optional] Plugin Code and/or Config

bg.BackgroundGeolocation.ready(bg.Config(
  reset: true,
  debug: true,
  desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
  distanceFilter: 10.0,
  stopOnTerminate: false,
  startOnBoot: true,
  logLevel: bg.Config.LOG_LEVEL_VERBOSE,
  url: Uri.https(Constants.host, '{omitted}').toString(),
  headers: {
    'Content-Type': 'application/json; charset=UTF-8',
  },
));

[Optional] Relevant log output

@christocracy
Copy link
Member

Ensure your app is calling .ready(config) each and every time your app launches, no matter what; even if launched automatically by the OS in the background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants