Periodic background synchronization
There is an iOS feature called BackgroundFetch
, which you can set up for
regularly downloads and processes small amounts of content from the network
You can setup a minimumBackgroundFetchInterval
.
In contrast to the mentioned Android feature, this interval is not guaranteed though.
The OS does some heuristic in a blackbox. It rewards you for using a "reasonable" (to the OS) CPU time/ power consumption and also for being used often by the user. On the other hand you get punished for draining the battery or (even worse) never being used/opened by the user.
See: Apple Sample and Apple Docs
Update: Since iOS13, BackgroundFetch
is deprecated.
There is a similar, new API named BGTask
, BGAppRefreshTask
is the equivalent to deprecated BackgroundFetch
.
See Apple Docs
Alternatively, depending on your needs, you can post a Silent (push) Notification
whenever the users data changes on server side. A silent push wakes up your app without notifying the user, so you can fetch data and maybe inform the user by scheduling a local notification.
See: Apple Documentation