What can "automatic" honestly mean for an Apple Health export?

Updated

It can mean the export runs by itself soon after new data arrives while the iPhone is unlocked, and never while it is locked. iOS encrypts the Health store when you lock the phone, so no app can count on reading it in the background until you unlock it again, and Health wakes an app for some types, steps among them, at most once an hour.

That is true for every app that exports Health data, whatever its settings promise. Here is what Apple's documentation says, and what to expect from an "automatic" export in practice.

Rule 1: locked phone, locked Health data

Apple: "the device encrypts the HealthKit store when the user locks the device. As a result, your app may not be able to read data from the store when it runs in the background." Apps can still write while the phone is locked; Health saves that data once you unlock (Apple, Protecting user privacy, as of November 2026).

So the night's sleep, recorded by your Watch while the phone sat locked on the nightstand, can leave the phone only after your first unlock in the morning.

Rule 2: Health decides when to wake an app

An app can ask Health to wake it when a type gets new data, called background delivery. Apple says HealthKit wakes the app "whenever a process saves or deletes samples of the specified type," at most once per the period the app asks for, and that some types have a maximum: on iOS, step count can wake an app at most hourly (Apple, enableBackgroundDelivery)). A woken app must tell Health when it has finished; if it does not, Health backs off and stops waking it.

What to expect, in practice

DataWhen an automatic export can move it
Last night's sleepAfter you first unlock the phone in the morning
A workoutSoon after it is saved to the phone, if the phone is unlocked then; otherwise after the next unlock
Steps, heart rate, active energyAt most hourly through their own wake-ups, and with any other export
Anything, while the phone stays lockedNot until it is unlocked

If you use your phone through the day, an automatic export can stay within about an hour of now. If the phone sits locked for a day, the export waits for that day too.

What an honest export app does about it

How HealthSQL handles it

HealthSQL is an iPhone app and a command-line tool that copy your whole Apple Health record into a local SQLite database on your computer, so AI agents can query it with SQL or MCP.

No app can do better than the unlock. An export that claims real-time Health data on an iPhone that is locked is promising something iOS does not allow.

Questions

Does Low Power Mode matter?

iOS decides when background work runs, and can hold it back, for example in Low Power Mode. When an export seems late, open the app; it runs at once.

Can a Shortcuts automation export Health data while the phone is locked?

The same rule applies: while the phone is locked, Health data is encrypted, whichever app or automation asks.