Apple Health integration

Apple Health data, in your own cloud

HealthKit is where an iPhone keeps health data, and where the apps and devices a user already trusts write theirs. Open Wearables reads it through a mobile SDK in your own app and lands it in the same schema as the rest of your sources, self-hosted under an MIT licence.

Built on Open Wearables

  • Heart Monitor logo
  • Hundred logo
  • JustGains logo
  • Lifelong logo
  • MoveTogether logo
  • ROXFIT logo
  • Smarter Diagnostics logo
  • Suna logo
  • Yoboo logo

Data coverage

Apple Health data we support

HealthKit is the widest data set of any source we connect, and one permission grant reads across everything the user already routes into it.

  • The widest set we support

    More data types than any other source, down to spirometry and falls.

  • Sleep

    Stages, efficiency, time in bed, naps and breathing disturbances.

  • Heart

    Heart rate, resting and recovery, HRV as SDNN, AFib burden.

  • Vitals

    SpO2, respiratory rate, temperature, glucose and blood pressure.

  • Body

    Weight, height, BMI, body fat, lean mass and waist.

  • Activity

    Steps, energy, exercise and stand time, flights and distance.

  • Gait and mobility

    Walking speed, step length, asymmetry, steadiness and stair speed.

  • Performance

    VO2 max, power, speed, cadence and Apple's effort scores.

  • Environment

    Audio exposure, time in daylight, UV and water temperature.

One connection, many devices

Devices we do not connect directly still arrive here

Most wearables write to Apple Health through their own app, which makes HealthKit a route to hardware with no direct integration. A companion app usually writes a subset of what its own API exposes, so where we connect a provider directly and you need the full depth, connect it directly.

  • Watches and trackers

    Sports watches and fitness trackers, each through its own app.

  • Rings and bands

    Smart rings and recovery bands that sync to Apple Health.

  • Sleep and metabolic

    Sleep monitors and continuous glucose monitors.

  • Medical devices

    Blood pressure monitors, ECG devices and body composition scales.

What working with Open Wearables gives you

Two views of the same deployment. One for the people wiring it in, one for the people signing it off.

  • One schema, not one per provider

    Apple Health arrives in the same shape as every cloud source, so your code carries no iOS-specific branches and adding a watch integration later does not change the call.


    • Sleep
    • Vitals
    • Activity
    • Gait
  • The SDK is the integration

    HealthKit has no cloud API, so reading it means code inside your app. That code is written, maintained and open, and your backend mints a short-lived user token, so the app secret never reaches the device.


    • Swift
    • Flutter
    • React Native
  • Background sync that survives the OS

    HealthKit tells the SDK when new data is written, and a scheduled task covers the rest, so data arrives without the user opening your app. Each sync moves only what is new, from a first-sync depth you choose.


    • Background sync
    • Incremental
  • An XML route for migrations

    A user's full Apple Health export can be imported directly, which is how you backfill years of history for someone switching to your product. Large files upload straight to your own object storage.


    • XML import
    • Your storage

How it works

From nothing to your first Apple Health query

  1. 01

    Bring it up

    Clone the repository and run it with Docker Compose. First API call in five minutes, before any provider is connected.

    Terminal

    git clone https://github.com/the-momentum/open-wearables.git
    cd open-wearables && docker compose up -d
  2. 02

    Add the SDK to your iOS app

    HealthKit data lives on the device, so this is where the integration happens rather than in a developer portal. Add the SDK, enable the HealthKit capability in Xcode and declare the record types you need.

    iOS SDK integration guide
  3. 03

    Ask the user for permission

    iOS shows its own HealthKit permission sheet, per data type, and the user decides what to share. Your app keeps its existing login, so there is no second account to manage.

  4. 04

    Query the user, not the provider

    Apple Health data arrives in the same schema as every other source, in your own database, so your application code carries no iOS-specific branches.

    Mobile SDKs

The honest comparison

Hosted SaaS API, in-house build, or self-hosted

Where each one actually wins. If a hosted API fits your situation, use one.

Hosted SaaS APIBuild in-houseOpen Wearables, self-hosted
[01] The mobile SDKTheirs, in your appYours to write and maintainOpen source, in your app, forkable
[02] Where HealthKit data goes firstTheir cloudYoursYour cloud account, your region
[03] Permission sheetTheirs or yours, dependingYoursApple's own, inside your app
[04] The data modelTheirs, you build against their schemaYoursYours, in your database
[05] Historical backfillWhatever window they offerYours to buildFull XML export, into your storage
[06] HealthKit changesThey absorb themYour team tracks and adaptsFixed in a release you pull
[07] Cost shapeScales with monthly active usersSalaries and infrastructureFixed, flattens as you grow

What stays yours

The deployment, the data and what you build on it stay in your account, whoever runs it

Sovereignty

Apple Health data goes from the device to your cloud, with no aggregator in between.

Residency

It stays in the region you chose, provable by pointing at an account.

Control

What you build on top of Open Wearables is yours, and the schema and the data are in your account.

Your own reasons

No regulator forcing it. You want the data in your own account anyway.

Apple Health is one integration in the same API

You query a user rather than a provider, so somebody on an iPhone and somebody wearing a ring you connect through the cloud both come back in one shape. Adding either later does not change your code.

Browse all integrations

Deploy Open Wearables in your own cloud

The repository is public and the deployment is yours from the first commit. Start from the source, or bring us in to stand it up in your account with the SDK live in your app and validated on real devices.

FAQ

Do you have more questions?

What is HealthKit?

Apple's health data store on iPhone and Apple Watch. Apps and devices write what they measured into one place on the device, and other apps read it with the user's permission, so it works as a hub rather than as one more device API.

Do we need a developer account or an approval?

You need an Apple Developer account to ship any iOS app, and HealthKit is an entitlement you enable on your own app. There is no separate partner programme, no review queue and no agreement to negotiate with Apple for access to the data.

Do we have to build a mobile app for this?

Not necessarily. HealthKit data never leaves the iPhone on its own, so an app has to read it: our SDK inside your own iOS app, or the Connect App if you have none. If you only need history rather than continuous sync, a user's XML export can be imported without any app at all.

Which SDKs are available?

Native iOS in Swift, plus Flutter and React Native wrappers over the same native core. The Android SDK covers Health Connect and Samsung Health on the other platform, so a cross-platform app uses one integration for both.

How does the data actually get to us?

The SDK reads HealthKit and pushes to your deployment. Two things keep it arriving without the user opening your app: HealthKit notifies the SDK when new data is written, and a background task runs on a schedule to catch the rest. iOS decides how often that task runs, so treat it as regular rather than exact. Each run moves only what is new.

How far back does the first sync go?

As far as you choose: the last ninety days, the last thirty, or everything HealthKit holds, which is the default. The depth persists, so later syncs follow the same rule.

Can we import a user's full history?

Yes. Apple Health exports everything to XML, and that file can be imported directly, which is the usual route when someone migrates to your product with years of history behind them. Large exports upload to your own object storage rather than through the API. The XML import guide has the detail.

Will data from a Garmin or an Oura arrive this way?

Often yes, because most companion apps write to Apple Health. That makes this integration a route to hardware we do not connect directly. One caveat worth planning for: a companion app usually writes a subset of what its own API exposes, so where we have a direct integration and you need full depth, connect it directly.

How is heart rate variability reported?

As SDNN, typically measured during sleep or rest. That matters if you are comparing against a source that reports RMSSD, because the two are different measures and should not be treated as interchangeable inside one score.

Is anything missing from sleep?

Stages, duration and time in bed all arrive. Heart rate, heart rate variability and blood oxygen measured during sleep are not yet attached to the sleep record itself, though they arrive as time series you can query across the same window.

Can we combine Apple Health with other sources?

Yes, and that is the normal case. You query a user rather than a provider, so somebody with an iPhone and a connected ring returns in one shape.