Enumeration

HKError.Code

Error codes that may be returned when calling HealthKit methods.

Topics

Constants

case noError

No error occurred.

case errorHealthDataUnavailable

HealthKit is restricted on this device.

case errorHealthDataRestricted

HealthKit is restricted on this device.

case errorInvalidArgument

An invalid argument was provided to the HealthKit API.

case errorAuthorizationDenied

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

case errorAuthorizationNotDetermined

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

case errorDatabaseInaccessible

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

case errorUserCanceled

The user canceled the operation.

case errorAnotherWorkoutSessionStarted

Another app has started a workout session.

case errorUserExitedWorkoutSession

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

See Also

Errors

struct HKError

An error returned from a HealthKit method.

let HKErrorDomain: String

The domain for all HealthKit errors.