Skip to content
Wearable Integrations

Platform integration

Apple HealthKit Integration for Healthcare Products

Apple HealthKit is an on-device framework, not a cloud service. Health and fitness data recorded by iPhone, Apple Watch and compatible third-party apps is stored in an encrypted store on the user's device, and there is no Apple-hosted web API that a server can call. Any integration that moves HealthKit data into a care platform, research database or analytics system therefore needs an iOS (or watchOS) app that reads from HealthKit with the user's permission and syncs to your backend.

We design that companion app layer and the pipeline behind it: authorization flows, incremental queries, background delivery, upload and retry logic, and mapping into your data model or FHIR-based clinical records. The work sits alongside our broader wearable device integration services when HealthKit is one of several sources.

Apple's frameworks, entitlements and App Store Review Guidelines change between OS releases. We review current Apple documentation and guidelines at project start and design around the privacy model rather than working against it.

Key points

  • On-device framework; an iOS or watchOS app is required
  • Per-data-type read and write permissions
  • Read denials are not visible to the app
  • App Store rules restrict how health data is used

Apple HealthKit: at a glance

Summary based on publicly available vendor documentation. Vendor terms, endpoints and limits change; we verify them against current documentation at the start of every project.

Integration methods
  • On-device HealthKit framework accessed from a native iOS or watchOS app
  • Companion app syncs data to your backend over your own secure API
  • Anchored object queries for incremental sync of new and deleted samples
  • HKObserverQuery with background delivery for change notifications
  • Clinical records (FHIR resources) via a separate entitlement, read-only
Data types
  • Steps, distance, workouts and mobility metrics
  • Heart rate, resting heart rate and HRV (SDNN)
  • Blood oxygen (SpO2) and respiratory rate
  • ECG recordings (HKElectrocardiogram, read-only with permission)
  • Sleep analysis
  • Blood glucose, blood pressure and body mass
  • Menstrual cycle tracking data
Authorization requirements
  • HealthKit capability and entitlement enabled in the app
  • Per-type read and write permission granted in the system authorization sheet
  • NSHealthShareUsageDescription and NSHealthUpdateUsageDescription in Info.plist
  • Separate entitlement and user permission for clinical health records
Developer approval & agreements
  • Apple Developer Program membership to ship the app
  • App Store review under guidelines that restrict health data use
  • No advertising or data mining use of HealthKit data; no storing personal health information in iCloud
  • Requirements are verified against current Apple documentation at project start
API limitations
  • No Apple-hosted cloud API; data leaves the device only through your app
  • Apps cannot detect whether read permission was denied; queries return no data
  • Background delivery timing is controlled by the system, not the app
  • HealthKit data is protected and unreadable while the device is locked
  • Some data types are read-only or unavailable on certain devices and regions
Healthcare use cases
  • Remote patient monitoring with iPhone and Apple Watch users
  • Cardiac programs using heart rate, HRV and ECG data
  • Sleep and recovery tracking
  • Post-discharge activity monitoring
  • Decentralized clinical research data collection

Integration Architecture: Why an App Is Required

Because HealthKit lives on the device, the integration starts with a native app. That app requests permission for specific data types, queries HealthKit, and sends the results to your backend through an authenticated API that you control. The backend then normalizes, stores and exposes the data to clinicians, researchers or other systems.

For incremental sync we use anchored object queries, which return samples added or deleted since a stored anchor. This avoids re-reading history on every launch and lets the backend apply deletions correctly. Observer queries registered for background delivery wake the app when new data arrives, but the system decides when that happens, so pipelines must tolerate delays and batch arrivals.

  • Native Swift app or watchOS extension with the HealthKit capability
  • Anchored queries persisted per data type for reliable incremental sync
  • Background delivery plus foreground sync as a fallback
  • Queued, retried uploads with idempotent server-side ingestion

Data Types Available Through HealthKit

HealthKit covers a wide set of quantity, category and correlation types. Common types for healthcare programs include steps, heart rate, resting heart rate, heart rate variability (reported as SDNN), blood oxygen, respiratory rate, sleep analysis, workouts, blood glucose, blood pressure, body mass, menstrual data and mobility metrics. ECG recordings are exposed as HKElectrocardiogram samples that third-party apps can read, not write, with the user's permission.

Clinical health records are a separate case. On supported devices, users can connect participating health systems and HealthKit stores FHIR resources such as conditions, medications and lab results. Reading these requires an additional entitlement and permission, and the data is read-only. Where clinical records need to flow into an EHR, see our EHR wearable integration work.

Authorization and Privacy Requirements

Each data type is authorized separately through the system authorization sheet, and the app must include clear usage descriptions in Info.plist for reading and for writing health data. Users can change their choices at any time in Settings.

For privacy, HealthKit does not tell an app whether read access was denied. A query for a denied type simply returns no results, which looks the same as a user with no data. Product design and support processes need to account for this, for example by explaining in the app which data the program expects and how users can review permissions.

App Store Review Guidelines restrict health data use: it may not be used for advertising or data mining, and personal health information must not be stored in iCloud. Apps also need a privacy policy that covers health data. These rules sit alongside any HIPAA safeguards your organization applies to the backend.

Limitations to Plan Around

Data is only accessible while the device is unlocked, and background execution is limited, so near-real-time streaming from HealthKit is not something a program should assume. Sync freshness depends on how often users open the app and how the system schedules background work.

Data availability also varies by device model, OS version, region and the apps a user has installed. We document these gaps in requirements and build monitoring that flags participants whose data has stopped arriving, rather than treating missing data as a normal reading.

Device lock

Protected health data cannot be read while the device is locked, which affects background sync timing.

System-scheduled delivery

Background delivery frequency is decided by the system and can be throttled.

Silent denials

Denied read permissions are indistinguishable from empty data in query results.

Healthcare Use Cases

HealthKit integration commonly supports remote patient monitoring, cardiac and chronic disease programs, sleep tracking, post-discharge follow-up and decentralized clinical research where participants already use iPhone and Apple Watch.

Consumer wearable measurements are not a substitute for clinical-grade measurement unless they have been validated for the intended use. We help teams define which signals are used for trend awareness and which require confirmation with clinical devices, and we keep that distinction visible in the data model.

Frequently asked questions

Does Apple provide a cloud API for HealthKit data?

No. HealthKit is an on-device framework. To get data to a server, you need an iOS or watchOS app that reads HealthKit with user permission and syncs it to your own backend.

Can our app tell if a user declined to share a data type?

Not for read permissions. HealthKit hides read denials for privacy, so a query returns no data whether access was denied or no samples exist. The app should explain expected permissions and how to review them.

Can we receive HealthKit data in real time?

Not reliably. Background delivery via observer queries is scheduled by the system, and data cannot be read while the device is locked. Pipelines should be designed for delayed and batched arrival.

Can we read ECG and clinical records?

ECG recordings can be read with user permission but not written by third-party apps. Clinical records require a separate entitlement and are read-only. Availability depends on device, region and the user's connected health systems.

Are there restrictions on how we use HealthKit data?

Yes. App Store Review Guidelines prohibit using health data for advertising or data mining and storing personal health information in iCloud. We review the current guidelines at project start.

Plan your HealthKit integration

Share the data types, devices and workflows you need, and we will outline an app and backend architecture that fits Apple's privacy model and your compliance requirements.