Hi,
According to the WorkManager documentation, periodic tasks are for Android only.
Customisation (Android only!)
Not every Android WorkManager feature is ported.
Two kinds of background tasks can be registered :
- One off task : runs only once
- Periodic tasks : runs indefinitely on a regular basis
In the Enable BGTaskScheduler section of iOS setup:
Schedule a processing task request to ask that the system launch your app when conditions are favorable for battery life to handle deferrable, longer-running processing, such as syncing, database maintenance, or similar tasks. The system will attempt to fulfill this request to the best of its ability within the next two days as long as the user has used your app within the past week.
I was put off using WorkManager, if I remember right because it doesn't work if the app is killed, so I'm using background_fetch instead.
There are still limitations but they are limitations placed by Apple: your app has to be used regularly for the background fetch to work, no matter which plugin you use.
If there is a better solution I would also like to know, my app relies on a reliable background task.