All I need is to check the data on the network every three hours and issue a warning when checking.
This isn’t really the intended use case for background fetch. The idea behind background fetch is that the system learns when the user is using the app and, if the user is regularly using it at specific times, the system sends the app a background fetch event before that time so that it can refresh. For example:
The user might run a social media app regularly throughout the day, so the system would send that app regular background fetch events.
The user might run their news app at breakfast time, so the system would send that app a background fetch event early in the morning.
The user might have a second news app on their device but never run it, in which case that app would never get any background fetch events.
Background fetch does not guarantee regular background fetch events. Indeed, there is no mechanism on iOS that guarantees regular execution in the background.
Once your app has checked the data on the network, what does it do with that data? It sounds like this might be a perfect candidate for push notifications, that is, you offload the ‘poll the network’ work to your server and which then sends a push notification if something relevant crops up. That notification can either address the user or the app (a so-called silent push), although be aware that silent pushes have their own set of budgetary constraints.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
—
WWDC runs Mon, 4 Jun through to Fri, 8 Jun. During that time all of DTS will be at the conference, helping folks out face-to-face.