Structure

HKError

An error returned from a HealthKit method.

Topics

Instance Properties

var errorCode: Int

The error’s code.

var errorUserInfo: [String : Any]

A dictionary containing additional information about the error.

var localizedDescription: String

A localized description of the error.

Type Properties

static var errorDomain: String

The domain for all HealthKit errors.

static var noError: HKError.Code

A code indicating that no error occurred.

static var errorHealthDataUnavailable: HKError.Code

An error code indicating that HealthKit is restricted on this device.

static var errorHealthDataRestricted: HKError.Code

An error code indicating that HealthKit is restricted on this device.

static var errorInvalidArgument: HKError.Code

An error code indicating that an invalid argument was passed to the HealthKit API.

static var errorAuthorizationDenied: HKError.Code

An error code indicating that the user has not given the app permission to perform the requested operation.

static var errorAuthorizationNotDetermined: HKError.Code

An error code indicating that your app has not yet asked the user for the authorization required to complete this task.

static var errorDatabaseInaccessible: HKError.Code

An error code indicating that the HealthKit data is unavailable because the HealthKit data is protected and the device is locked.

static var errorUserCanceled: HKError.Code

An error code indicating that the user canceled the operation.

static var errorAnotherWorkoutSessionStarted: HKError.Code

An error code indicating that another app has started a workout session.

static var errorUserExitedWorkoutSession: HKError.Code

An error code indicating that the user exited your application while a workout session was running.

Operators

static func != (HKError, HKError)

Returns a Boolean value indicating whether two values are not equal.

See Also

Errors

let HKErrorDomain: String

The domain for all HealthKit errors.

enum HKError.Code

Error codes that may be returned when calling HealthKit methods.