HKHealthStore
The access point for all data managed by HealthKit.
Declaration
class HKHealthStoreMentioned in
Overview
Use a HKHealthStore object to request permission to share or read HealthKit data. After you have permission, you can use the HealthKit store to save new samples to the store, or to manage the samples that your app saved. Additionally, you can use the HealthKit store to start, stop, and manage queries.
For more information, see Setting up HealthKit.
Topics
Accessing HealthKit
authorizationStatus(for:)HKAuthorizationStatusgetRequestStatusForAuthorization(toShare:read:completion:)HKAuthorizationRequestStatusisHealthDataAvailable()supportsHealthRecords()requestAuthorization(toShare:read:completion:)requestAuthorization(toShare:read:)requestPerObjectReadAuthorization(for:predicate:completion:)handleAuthorizationForExtension(completion:)authorizationViewControllerPresenter
Querying HealthKit data
Reading characteristic data
Working with HealthKit objects
delete(_:withCompletion:)delete(_:withCompletion:)deleteObjects(of:predicate:withCompletion:)earliestPermittedSampleDate()save(_:withCompletion:)save(_:withCompletion:)
Accessing the preferred units
Managing background delivery
enableBackgroundDelivery(for:frequency:withCompletion:)com.apple.developer.healthkit.background-deliveryHKUpdateFrequencydisableBackgroundDelivery(for:withCompletion:)disableAllBackgroundDelivery(completion:)