Edit

Share via


HKErrorCode Enum

Definition

Enumerates common errors made when accessing health data.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 2, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public enum HKErrorCode
type HKErrorCode = 
Inheritance
HKErrorCode
Attributes

Fields

Name Value Description
NoError 0

Indicates no error in accessing the data.

HealthDataUnavailable 1

The requested data is not available.

HealthDataRestricted 2

The data are restricted.

InvalidArgument 3

There was an error in the arguments to the data-access request.

AuthorizationDenied 4

The app has been denied permission to access the requested data.

AuthorizationNotDetermined 5

The user has not yet interacted with the permissions dialog in relation to the current app.

DatabaseInaccessible 6

The Health Kit datastore is not available.

UserCanceled 7

The user canceled the operation.

AnotherWorkoutSessionStarted 8

Indicates that another app started a workout session.

UserExitedWorkoutSession 9

Indicates that the user exited the workout session.

Applies to