<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKHealthStore",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKHealthStore"
  },
  "title" : "HKHealthStore"
}
-->

# HKHealthStore

The access point for all data managed by HealthKit.

```
class HKHealthStore
```

## Overview

Use a [`HKHealthStore`](/documentation/HealthKit/HKHealthStore) object to request permission to share or read HealthKit data. People can grant your app full access to a data type, limited access restricted to a recent window of data, or no access at all. After requesting authorization, you can check the scope of your read access for specific data types before making queries. You can also use the HealthKit store to save new samples to the store, manage the samples that your app saves, and start, stop, and manage queries.

For more information, see <doc://com.apple.healthkit/documentation/HealthKit/setting-up-healthkit>.

## Topics

### Accessing HealthKit

[`-  authorizationStatusForType:`](/documentation/HealthKit/HKHealthStore/authorizationStatus(for:))

Returns the app’s authorization status for sharing the specified data type.

[`HKAuthorizationStatus`](/documentation/HealthKit/HKAuthorizationStatus)

Constants indicating the authorization status for a particular data type.

[`-  getRequestStatusForAuthorizationToShareTypes:readTypes:completion:`](/documentation/HealthKit/HKHealthStore/getRequestStatusForAuthorization(toShare:read:completion:))

Indicates whether the system presents the user with a permission sheet if your app requests authorization for the provided types.

[`HKAuthorizationRequestStatus`](/documentation/HealthKit/HKAuthorizationRequestStatus)

Values that indicate whether your app needs to request authorization from the user.

[`+  isHealthDataAvailable`](/documentation/HealthKit/HKHealthStore/isHealthDataAvailable())

Returns a Boolean value that indicates whether HealthKit is available on this device.

[`-  supportsHealthRecords`](/documentation/HealthKit/HKHealthStore/supportsHealthRecords())

Returns a Boolean value that indicates whether the current device supports clinical records.

[`-  requestAuthorizationToShareTypes:readTypes:completion:`](/documentation/HealthKit/HKHealthStore/requestAuthorization(toShare:read:completion:))

Requests permission to save and read the specified data types.

[`requestAuthorization(toShare:read:)`](/documentation/HealthKit/HKHealthStore/requestAuthorization(toShare:read:))

Asynchronously requests permission to save and read the specified data types.

[`-  requestPerObjectReadAuthorizationForType:predicate:completion:`](/documentation/HealthKit/HKHealthStore/requestPerObjectReadAuthorization(for:predicate:completion:))

Asynchronously requests permission to read a data type that requires per-object authorization (such as vision prescriptions).

[`-  handleAuthorizationForExtensionWithCompletion:`](/documentation/HealthKit/HKHealthStore/handleAuthorizationForExtension(completion:))

Requests permission to save and read the data types specified by an extension.

[`authorizationViewControllerPresenter`](/documentation/HealthKit/HKHealthStore/authorizationViewControllerPresenter)

The view controller that presents HealthKit authorization sheets.

[`-  getEarliestAuthorizedSampleDateForTypes:completion:`](/documentation/HealthKit/HKHealthStore/getEarliestAuthorizedSampleDate(for:completion:))

Returns the earliest date that the person permits your app to read samples for the given data types.

[`earliestAuthorizedSampleDate(for:)`](/documentation/HealthKit/HKHealthStore/earliestAuthorizedSampleDate(for:))

Returns the earliest date that the person permits your app to read samples for the given data types.

[`-  earliestPermittedSampleDate`](/documentation/HealthKit/HKHealthStore/earliestPermittedSampleDate())

Returns the earliest date that the framework permits your app to save or read samples.

### Querying HealthKit data

[`-  executeQuery:`](/documentation/HealthKit/HKHealthStore/execute(_:))

Starts executing the provided query.

[`-  stopQuery:`](/documentation/HealthKit/HKHealthStore/stop(_:))

Stops a long-running query.

### Reading characteristic data

[`-  biologicalSexWithError:`](/documentation/HealthKit/HKHealthStore/biologicalSex())

Reads someone’s biological sex from the HealthKit store.

[`-  bloodTypeWithError:`](/documentation/HealthKit/HKHealthStore/bloodType())

Reads the user’s blood type from the HealthKit store.

[`-  dateOfBirthWithError:`](/documentation/HealthKit/HKHealthStore/dateOfBirth())

Reads the user’s date of birth from the HealthKit store as a date value.

[`-  dateOfBirthComponentsWithError:`](/documentation/HealthKit/HKHealthStore/dateOfBirthComponents())

Reads the user’s date of birth from the HealthKit store as date components.

[`-  fitzpatrickSkinTypeWithError:`](/documentation/HealthKit/HKHealthStore/fitzpatrickSkinType())

Reads the user’s Fitzpatrick Skin Type from the HealthKit store.

[`-  wheelchairUseWithError:`](/documentation/HealthKit/HKHealthStore/wheelchairUse())

Reads the user’s wheelchair use from the HealthKit store.

### Working with HealthKit objects

[`-  deleteObject:withCompletion:`](/documentation/HealthKit/HKHealthStore/delete(_:withCompletion:)-78l1m)

Deletes the specified object from the HealthKit store.

[`-  deleteObjects:withCompletion:`](/documentation/HealthKit/HKHealthStore/delete(_:withCompletion:)-17hzm)

Deletes the specified objects from the HealthKit store.

[`-  deleteObjectsOfType:predicate:withCompletion:`](/documentation/HealthKit/HKHealthStore/deleteObjects(of:predicate:withCompletion:))

Deletes objects saved by this application that match the provided type and predicate.

[`-  saveObject:withCompletion:`](/documentation/HealthKit/HKHealthStore/save(_:withCompletion:)-6fmtg)

Saves the provided object to the HealthKit store.

[`-  saveObjects:withCompletion:`](/documentation/HealthKit/HKHealthStore/save(_:withCompletion:)-47iwb)

Saves an array of objects to the HealthKit store.

### Accessing the preferred units

[`-  preferredUnitsForQuantityTypes:completion:`](/documentation/HealthKit/HKHealthStore/preferredUnits(for:completion:))

Returns the user’s preferred units for the given quantity types.

[`preferredWorkoutZoneConfiguration(for:)`](/documentation/HealthKit/HKHealthStore/preferredWorkoutZoneConfiguration(for:))

Returns a person’s preferred zone configuration for a quantity type.

  <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/HKUserPreferencesDidChange>

[`HKUserPreferencesDidChangeNotification`](/documentation/HealthKit/HKUserPreferencesDidChangeNotification)

Notifies observers whenever the user changes his or her preferred units.

### Managing background delivery

[`-  enableBackgroundDeliveryForType:frequency:withCompletion:`](/documentation/HealthKit/HKHealthStore/enableBackgroundDelivery(for:frequency:withCompletion:))

Enables the delivery of updates to an app running in the background.

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.healthkit.background-delivery>

[`HKUpdateFrequency`](/documentation/HealthKit/HKUpdateFrequency)

Constants that determine how often the system launches your app in response to changes to HealthKit data.

[`-  disableBackgroundDeliveryForType:withCompletion:`](/documentation/HealthKit/HKHealthStore/disableBackgroundDelivery(for:withCompletion:))

Disables background deliveries of update notifications for the specified data type.

[`-  disableAllBackgroundDeliveryWithCompletion:`](/documentation/HealthKit/HKHealthStore/disableAllBackgroundDelivery(completion:))

Disables all background deliveries of update notifications.

### Managing workouts

[`-  splitTotalEnergy:startDate:endDate:resultsHandler:`](/documentation/HealthKit/HKHealthStore/splitTotalEnergy(_:start:end:resultsHandler:))

Calculates the active and resting energy burned based on the total energy burned over the given duration.

[`-  recoverActiveWorkoutSessionWithCompletion:`](/documentation/HealthKit/HKHealthStore/recoverActiveWorkoutSession(completion:))

Recovers an active workout session.

### Managing workout sessions

[`workoutSessionMirroringStartHandler`](/documentation/HealthKit/HKHealthStore/workoutSessionMirroringStartHandler)

A block that the system calls when it starts a mirrored workout session.

[`-  startWatchAppWithWorkoutConfiguration:completion:`](/documentation/HealthKit/HKHealthStore/startWatchApp(with:completion:))

Launches or wakes the companion watchOS app to create a new workout session.

[`-  pauseWorkoutSession:`](/documentation/HealthKit/HKHealthStore/pause(_:))

Pauses the provided workout session.

[`-  resumeWorkoutSession:`](/documentation/HealthKit/HKHealthStore/resumeWorkoutSession(_:))

Resumes the provided workout session.

### Managing estimates

[`-  recalibrateEstimatesForSampleType:atDate:completion:`](/documentation/HealthKit/HKHealthStore/recalibrateEstimates(sampleType:date:completion:))

Recalibrates the prediction algorithm used to calculate the specified sample type.

### Accessing the move mode

[`-  activityMoveModeWithError:`](/documentation/HealthKit/HKHealthStore/activityMoveMode())

Returns the activity move mode for the current user.

  <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/HKUserPreferencesDidChange>

[`HKUserPreferencesDidChangeNotification`](/documentation/HealthKit/HKUserPreferencesDidChangeNotification)

Notifies observers whenever the user changes his or her preferred units.

### Deprecated symbols

[`-  addSamples:toWorkout:completion:`](/documentation/HealthKit/HKHealthStore/add(_:to:completion:))

Associates the provided samples with the specified workout.

[`-  startWorkoutSession:`](/documentation/HealthKit/HKHealthStore/start(_:))

Starts a workout session for the current app.

[`-  endWorkoutSession:`](/documentation/HealthKit/HKHealthStore/end(_:))

Ends a workout session for the current app.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)