Enumeration

HKErrorCode

Error codes that may be returned when calling HealthKit methods.

Declaration

typedef enum HKErrorCode : NSInteger {
    ...
} HKErrorCode;

Topics

Constants

HKNoError

No error occurred.

HKErrorHealthDataUnavailable

HealthKit is restricted on this device.

HKErrorHealthDataRestricted

HealthKit is restricted on this device.

HKErrorInvalidArgument

An invalid argument was provided to the HealthKit API.

HKErrorAuthorizationDenied

The user has not given the app permission to perform the requested operation.

HKErrorAuthorizationNotDetermined

Your app has not yet asked the user for the authorization required to complete this task.

HKErrorRequiredAuthorizationDenied

An error indicating that the user has not granted the application authorization to access all the required data types.

HKErrorDatabaseInaccessible

The HealthKit data is unavailable because the HealthKit data is protected and the device is locked.

HKErrorUserCanceled

The user canceled the operation.

HKErrorAnotherWorkoutSessionStarted

Another app has started a workout session.

HKErrorUserExitedWorkoutSession

The user exited your application while a workout session was running.

See Also

Errors

HKErrorDomain

The domain for all HealthKit errors.