HealthKit

Read and write health and fitness data, with people in full control of what they share.

Introduced
2014
iOS 8
Kind
Framework
Runs on
Get it from
iOS
8.0+
iPadOS
8.0+
Mac Catalyst
17.0+
macOS
14.0+
tvOS
visionOS
1.0+
watchOS
2.0+

Overview

HealthKit is the central store for health data on Apple devices: activity, workouts, sleep, heart rate, nutrition, medications, mental wellbeing and much more. Apps ask for permission per data type, and people can change their minds at any time in Settings.

Recent releases added workouts on iPhone and iPad, a Medications API and workout zones.

Privacy first

People choose exactly which data each app can read or write.

Workouts

Track workouts on Apple Watch, iPhone and iPad.

Medications

Read medication schedules and logged doses.

Mental wellbeing

State of mind, plus depression and anxiety assessments.

Steps.swift
import HealthKit let store = HKHealthStore() let steps = HKQuantityType(.stepCount) try await store.requestAuthorization(toShare: [], read: [steps]) let today = HKQuery.predicateForSamples( withStart: Calendar.current.startOfDay(for: .now), end: .now ) let query = HKStatisticsQueryDescriptor( predicate: .quantitySample(type: steps, predicate: today), options: .cumulativeSum ) let total = try await query.result(for: store)? .sumQuantity()?.doubleValue(for: .count())

History

How it grew up.

2014

Introduced

HealthKit and the Health app arrive in iOS 8.

2018

Health Records

Apps can read clinical health records in iOS 12.

2023

iPad

The Health app and HealthKit come to iPad.

2024

Mental wellbeing

State of mind logging and visionOS support.

2025

Medications

A Medications API and workouts on iPhone and iPad.

2026

Workout zones

Heart rate and power zones, plus a menopause API.