What can "automatic" honestly mean for an Apple Health export?
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
| Data | When an automatic export can move it |
|---|---|
| Last night's sleep | After you first unlock the phone in the morning |
| A workout | Soon after it is saved to the phone, if the phone is unlocked then; otherwise after the next unlock |
| Steps, heart rate, active energy | At most hourly through their own wake-ups, and with any other export |
| Anything, while the phone stays locked | Not 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
- It says how fresh the data is. A "last synced" time on every answer, not a promise of real time.
- It says when the feed has stopped, and what to do: usually, open the app or unlock the phone.
- It catches up completely. When it runs again after a gap, it picks up everything since the last export, not just the latest day.
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.
- With the $7.99 purchase, it asks Health to wake it at once for new workouts, sleep, heart rate variability, weight and VO2 max, and at most hourly for heart rate, steps and active energy. Each run exports what is new, of every type, from where the last run stopped.
- Without the purchase, the full export runs when you open the app.
- On your Mac, every answer from
healthsqlcarriesphone_synced, the time of the last export. If the phone has not exported for more than 3 days, the answer adds: "The iPhone last synced N days ago. Open HealthSQL on the iPhone; it can only read Health while the phone is unlocked."
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.