transistorsoft/flutter_background_fetch

[BUG] background service is not running in App (Work in simulator)

Closed this issue · 1 comments

Your Environment

  • Plugin version: 1.1.3

  • Platform: iOS

  • OS version: 16.0

  • Device manufacturer / model: iPhone 14

  • Flutter info (flutter info, flutter doctor):
    [✓] Flutter (Channel stable, 3.13.9, on macOS 13.3.1 22E772610a darwin-arm64, locale fr-FR)
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2022.3)
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    [✓] Connected device (3 available)
    [✓] Network resources
    • No issues found!

  • Plugin config

To Reproduce
Steps to reproduce the behavior:

  1. Install App on Real Device (with fetch capabilities)
  2. Wait 15min with App run on background
  3. Background Task Never called/fired

Additional context

When running on Simulator I try simulate fetch background on XCode, and the event is fired/called OK
When I run the same on real device, the background never fired !

If it works in the Simulator, that's all you need to know that it works. Everything else is up to the OS. You will never get an event after exactly 15 min. It all depends on Apple's machine-learning algorithm which presumably depends upon the frequency of interaction with your app (how often, how long and when your app is interacted with).

There is nothing you can do but wait. It can take days before iOS begins regularly emitting 'fetch' events and there nothing you can do but wait patiently.

This issue has been posted dozens of times before.

If it works in the Simulator, you're done.