How reliable is iOS background data delivery?
On iOS, background delivery is triggered by the OS when new HealthKit data is available, not on a fixed schedule.
On iOS, background delivery is triggered by the OS when new HealthKit data is available, not on a fixed schedule. The documented behaviour is:
It only fires while the phone is unlocked.
It only fires where there is a network connection.
It still fires when the app is killed, but at a much lower frequency.
Only enabled data types from the Terra Dashboard are delivered.
Opening the app regularly tends to improve scheduling, since iOS prioritises frequently used apps.
To make delivery as reliable as possible, confirm the setup:
The HealthKit Background Delivery, Background Processing and Background Fetch capabilities are enabled in Xcode.
Terra.setUpBackgroundDelivery() is called once in your AppDelegate's didFinishLaunchingWithOptions.
co.tryterra.data.post.request is listed in your Info.plist BGTaskSchedulerPermittedIdentifiers.
Per affected user, HealthKit permissions cover the requested data types (and, if you use CustomPermissions, the specific permissions required per group are granted).
Background delivery only sends future data. A historical/backfill request is a separate one-time sync. It can only return Apple Health data the SDK has access to on device, and runs when the app next has an active session.
Last updated
Was this helpful?