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:
Add the HealthKit background-delivery entitlement (com.apple.developer.healthkit.background-delivery) / enable HealthKit Background Delivery in Xcode capabilities.
Call setUpBackgroundDelivery() in your AppDelegate's didFinishLaunchingWithOptions, per the iOS SDK docs.
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?