Contents

HKError.Code.errorHealthDataUnavailable

HealthKit accessed on an unsupported device, such as an iPad.

Declaration

case errorHealthDataUnavailable

Discussion

Because iOS apps can run on devices that don’t support HealthKit (for example, on an iPad), always verify that the current device supports HealthKit by calling isHealthDataAvailable() before calling any other HealthKit methods. If HealthKit isn’t available on the device, other HealthKit methods fail with an errorHealthDataUnavailable error.

See Also

Errors