Type Method


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


class func isHealthDataAvailable() -> Bool

Return Value

true if HealthKit is available; otherwise, false.


HealthKit is not available on iPad.

See Also

Accessing HealthKit

func authorizationStatus(for: HKObjectType) -> HKAuthorizationStatus

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

enum HKAuthorizationStatus

Constants indicating the authorization status for a particular data type.

func getRequestStatusForAuthorization(toShare: Set<HKSampleType>, read: Set<HKObjectType>, completion: (HKAuthorizationRequestStatus, Error?) -> Void)

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

enum HKAuthorizationRequestStatus

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

func supportsHealthRecords() -> Bool

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

func handleAuthorizationForExtension(completion: (Bool, Error?) -> Void)

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