Type Method

isHealthDataAvailable()

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

Declaration

class func isHealthDataAvailable() -> Bool

Return Value

true if HealthKit is available; otherwise, false.

Discussion

HealthKit is not available on iPad.

See Also

Accessing HealthKit

func authorizationStatus(for: HKObjectType)

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 handleAuthorizationForExtension(completion: (Bool, Error?) -> Void)

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