For the complete documentation index, see llms.txt. This page is also available as Markdown.

How do I enable Apple Health background delivery?

Apple Health flows from the on-device SDK to Terra's servers; there is no server-side pull, so a server-side GET /v2/{data_type}?to_webhook=true only returns…

Apple Health flows from the on-device SDK to Terra's servers; there is no server-side pull, so a server-side GET /v2/{data_type}?to_webhook=true only returns data the SDK has already collected. If data only syncs when the user opens the app, background delivery is not configured.

To enable it:

1

Add the HealthKit background-delivery entitlement (com.apple.developer.healthkit.background-delivery) / enable HealthKit Background Delivery in Xcode capabilities.

2

Call setUpBackgroundDelivery() in your AppDelegate's didFinishLaunchingWithOptions, per the iOS SDK docs.

Web apps cannot connect to Apple Health at all, an app on the device is required.

After a build with background delivery enabled ships, data syncs automatically; opening the app triggers an immediate re-sync. If webhooks are flowing on Terra's side but you are not seeing them, verify your server is registering the incoming webhooks.

Last updated

Was this helpful?