Module 18 Β· Push & Background Work β Lesson 3 of 4 Β· ~9 min
Background refresh
Deferred work the OS schedules for you
Push notifications are reactive β something happens, APNs delivers it. BGTaskScheduler (from the BackgroundTasks framework) is the opposite: proactive, periodic work you ask the OS to run later, like "sync the walk journal every so often even if the learner hasn't opened PawWalk." That ties straight back to module 14's offline-first sync engine β background refresh is what keeps the local walk journal from going stale between opens.
Two steps: register a task identifier's handler at launch (so the OS knows what code to run), then schedule a request for that identifier whenever you want a future run queued.