HKError.Code.errorHealthDataUnavailable
HealthKit accessed on an unsupported device, such as an iPad.
Declaration
case errorHealthDataUnavailableDiscussion
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
HKError.Code.errorHealthDataRestrictedHKError.Code.errorInvalidArgumentHKError.Code.errorAuthorizationDeniedHKError.Code.errorAuthorizationNotDeterminedHKError.Code.errorRequiredAuthorizationDeniedHKError.Code.errorDatabaseInaccessibleHKError.Code.errorUserCanceledHKError.Code.errorAnotherWorkoutSessionStartedHKError.Code.errorUserExitedWorkoutSessionHKError.Code.errorNoData