errorHealthDataUnavailable
The user accessed HealthKit on an unsupported device.
Declaration
static var errorHealthDataUnavailable: HKError.Code { get }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.