---
title: HealthKit
framework: HealthKit
role: collection
role_heading: Framework
platforms: [iOS 8.0+, iPadOS 8.0+, Mac Catalyst 17.0+, macOS 14.0+, visionOS 1.0+, watchOS 2.0+]
path: healthkit
---

# HealthKit

Access and share health and fitness data while maintaining the user’s privacy and control.

## Overview

Overview HealthKit provides a central repository for health and fitness data on iPhone and Apple Watch. With the user’s permission, apps communicate with the HealthKit store to access and share this data.

Creating a complete, personalized health and fitness experience includes a variety of tasks: Collecting and storing health and fitness data Analyzing and visualizing the data Enabling social interactions HealthKit apps take a collaborative approach to building this experience. Your app doesn’t need to provide all of these features. Instead, you can focus just on the subset of tasks that most interests you. For example, users can select their favorite weight-tracking, step-counting, and health challenge app, each calibrated to their personal needs. Because HealthKit apps freely exchange data (with user permission), the combined suite provides a more customized experience than any single app on its own. For example, when a group of friends joins a daily step-counting challenge, each person can use their preferred hardware device and app to track their steps, while everyone in the group uses the same social app for the challenge. HealthKit is also designed to manage and merge data from multiple sources. For example, users can view and manage all of their data in the Health App, including adding data, deleting data, and changing an app’s permissions. Therefore, your app needs to handle these changes, even when they occur outside your app. note: Because health data may contain sensitive, personal information, apps must receive permission from the user to read data from or write data to the HealthKit store. They must also take steps to protect that data at all times. For more information, see Protecting user privacy.

## Topics

### Essentials

- [About the HealthKit framework](healthkit/about-the-healthkit-framework.md)
- [Setting up HealthKit](healthkit/setting-up-healthkit.md)
- [Authorizing access to health data](healthkit/authorizing-access-to-health-data.md)
- [Protecting user privacy](healthkit/protecting-user-privacy.md)
- [HealthKit updates](updates/healthkit.md)
- [HealthKitUI](healthkitui.md)

### Health data

- [Saving data to HealthKit](healthkit/saving-data-to-healthkit.md)
- [Reading data from HealthKit](healthkit/reading-data-from-healthkit.md)
- [HKHealthStore](healthkit/hkhealthstore.md)
- [Creating a Mobility Health App](healthkit/creating-a-mobility-health-app.md)
- [Data types](healthkit/data-types.md)
- [Samples](healthkit/samples.md)
- [Queries](healthkit/queries.md)
- [Visualizing HealthKit State of Mind in visionOS](healthkit/visualizing-healthkit-state-of-mind-in-visionos.md)
- [Logging symptoms associated with a medication](healthkit/logging-symptoms-associated-with-a-medication.md)

### Workout data

- [Workouts and activity rings](healthkit/workouts-and-activity-rings.md)

### Errors

- [HKError](healthkit/hkerror.md)
- [HKErrorDomain](healthkit/hkerrordomain.md)
- [HKError.Code](healthkit/hkerror/code.md)

### Reference

- [HealthKit Enumerations](healthkit/healthkit-enumerations.md)
- [HealthKit Classes](healthkit/healthkit-classes.md)
- [HealthKit Constants](healthkit/healthkit-constants.md)
- [HealthKit Data Types](healthkit/healthkit-data-types.md)
- [HealthKit Functions](healthkit/healthkit-functions.md)
- [Macros](healthkit/healthkit-macros.md)
- [HealthKit Variables](healthkit/healthkit-variables.md)
