Contents

isHealthDataAvailable()

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

Declaration

class func isHealthDataAvailable() -> Bool

Mentioned in

Return Value

true if HealthKit is available; otherwise, false.

Discussion

By default, HealthKit data is available on iOS, watchOS, and visionOS. HealthKit data is also available to iPads running iPadOS 17 or later, and to iOS apps running on Vision Pro. Devices running in an enterprise environment may restrict access to HealthKit data.

The HealthKit framework is available on devices running iPadOS 16 and earlier and macOS 13 and later, but your app can’t read or write HealthKit data. Calls to isHealthDataAvailable() return false.

See Also

Accessing HealthKit