> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/help-center/help-topics/no-data/webhooks-background-delivery-stopping/apple-health-background-delivery-not-configured.md).

# 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 data the SDK has already collected. If data only syncs when the user opens the app, **background delivery is not configured**.

To enable it:

{% stepper %}
{% step %}
Add the HealthKit background-delivery entitlement (`com.apple.developer.healthkit.background-delivery`) / enable HealthKit Background Delivery in Xcode capabilities.
{% endstep %}

{% step %}
Call `setUpBackgroundDelivery()` in your AppDelegate's `didFinishLaunchingWithOptions`, per the [iOS SDK docs](https://docs.tryterra.co/health-and-fitness-api/mobile-only-sources/ios-swift).
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Web apps cannot connect to Apple Health at all, an app on the device is required.
{% endhint %}

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.
