Reputation: 1
I am trying to run the sample project of background_fetch or Workmanager plugin in ios on release build but the background fetch function is not invoked and hence the execution of code is not happening. Any solution for this for ios release build?
Upvotes: 0
Views: 553
Reputation: 23
From background_fetch´s pub.dev page:
- scheduleTask seems only to fire when the device is plugged into power. scheduleTask is designed for low-priority tasks and will never run as frequently as you desire. The default fetch task will run far more frequently.
- ⚠️ When your app is terminated, iOS no longer fires events — There is no such thing as stopOnTerminate: false for iOS.
- iOS can task days before Apple's machine-learning algorithm settles in and begins regularly firing events. Do not sit staring at your logs waiting for an event to fire. If your simulated events work, that's all you need to know that everything is correctly configured.
- If the user doesn't open your iOS app for long periods of time, iOS will stop firing events.
Upvotes: 0