I have an iOS app that periodically needs to do some work in the background. I was planning to use FCM to send notifications every 15 minutes and have my app do some work when they arrive. Preferably the notification should not be shown to the user, but the most important thing is that the background work can run for 10-20 seconds.
I have looked into BackgroundTasks
to avoid sending the notifications, but these tasks are not reliable and are sometimes run only once or twice a day.
When it comes to push notifications, I could either send a "classic" one that generates a notification, or a background notification. The problem with the latter is that it will be delivered max 3 times per hour (source). Maybe a classic notification with a NotificationExtension
is the best approach? I am not sure how much time the system will grant the app though, and if it works when the app is in the background.
So my question is: What is the best, most reliable way to perform background work on an iOS app every 15 minutes?