Enumeration

HMError.Code

Possible error values that can be returned from HomeKit APIs.

Declaration

enum HMError.Code : Int, _ErrorCodeProtocol

Topics

Error Codes

case unexpectedError

An unexpected error.

case alreadyExists

An error indicating the container already contains the object you are trying to add.

case notFound

An error indicating the object was not found in the container.

case invalidParameter

An error indicating the object is invalid for the given operation.

case accessoryNotReachable

An error indicating the accessory is not reachable over the network.

case readOnlyCharacteristic

An attempt to modify a read-only value.

case writeOnlyCharacteristic

An attempt to read from a write-only characteristic.

case notificationNotSupported

An attempt to register for notifications from an accessory that does not support notifications.

case operationTimedOut

An error indicating the operation timed out.

case accessoryPoweredOff

An error indicating the accessory is off.

case accessDenied

An error indicating the current user doesn’t have privileges to perform the operation.

case objectAssociatedToAnotherHome

An attempt to associate an object with a home when it’s already associated with another home.

case objectNotAssociatedToAnyHome

An attempt to perform an operation on an object that is not associated to any home.

case objectAlreadyAssociatedToHome

An attempt to associate an object with a home when it’s already associated with that home.

case accessoryIsBusy

An error indicating the accessory is busy.

case operationInProgress

An error indicating the operation is already in progress.

case accessoryOutOfResources

An error indicating the accessory is out of resources.

case insufficientPrivileges

An error indicating insufficient privileges for the operation.

case accessoryPairingFailed

An attempt to pair with the accessory has failed.

case invalidDataFormatSpecified

An error indicating an invalid data format was specified.

case nilParameter

An error indicating that nil was passed for an operation that does not accept nil.

case unconfiguredParameter

An error indicating an unconfigured parameter.

case invalidClass

An attempt to use an abstract base class in an operation instead of a concrete subclass.

case operationCancelled

An error indicating the user canceled the operation.

case roomForHomeCannotBeInZone

An attempt to add the room that represents the entire home to a zone.

case noActionsInActionSet

An attempt to execute an action set with no actions.

case noRegisteredActionSets

An attempt to activate a trigger with no action sets.

case missingParameter

An error indicating a missing parameter.

case fireDateInPast

An attempt to activate a timer trigger with a date in the past.

case roomForHomeCannotBeUpdated

An attempt to change the room that represents the entire home.

case actionInAnotherActionSet

An attempt to add an action that exists in one action set to another action set.

case objectWithSimilarNameExistsInHome

An attempt to give the name of one object to another object in the home.

case homeWithSimilarNameExists

An attempt to assign a home the same name as an existing home.

case renameWithSimilarName

An attempt to rename an object with its current name.

case cannotRemoveNonBridgeAccessory

An attempt to remove a bridged accessory.

case nameContainsProhibitedCharacters

An attempt to name an object with prohibited characters.

case nameDoesNotStartWithValidCharacters

An attempt to start the name of an object with invalid characters.

case userIDNotEmailAddress

An error indicating the user’s ID is not a valid email address.

case userDeclinedAddingUser

An error indicating the user canceled the add user operation.

case userDeclinedRemovingUser

An error indicating the user canceled the remove user operation.

case userDeclinedInvite

An error indicating the user declined the invitation.

case userManagementFailed

A user management error not covered by the other errors.

case recurrenceTooSmall

An error indicating the recurrence interval is too short.

case invalidValueType

An attempt to use an invalid value type.

case valueLowerThanMinimum

An attempt to use a numeric value lower than the specified minimum value.

case valueHigherThanMaximum

An attempt to use a numeric value higher than the specified maximum value.

case stringLongerThanMaximum

An attempt to use a string longer than the maximum allowed.

case homeAccessNotAuthorized

An error indicating access to the home was not authorized.

case operationNotSupported

An attempt to use an unsupported operation.

case maximumObjectLimitReached

An error indicating the maximum object count has been reached.

case accessorySentInvalidResponse

An error indicating the accessory sent an invalid response.

case stringShorterThanMinimum

An attempt to use a string shorter than the required minimum.

case genericError

An error that does not have a more specific error code.

case securityFailure

A security failure.

case communicationFailure

A communication failure.

case messageAuthenticationFailed

A message authentication failure.

case invalidMessageSize

An error indicating an invalid message size.

case accessoryDiscoveryFailed

An error indicating accessory discovery failed.

case clientRequestError

An error with the client request.

case accessoryResponseError

An error with the accessory’s response.

case nameDoesNotEndWithValidCharacters

An error indicating the provided name has invalid characters at the end.

case accessoryIsBlocked

An error indicating a blocked accessory.

case invalidAssociatedServiceType

An error indicating an invalid service type.

case actionSetExecutionFailed

An attempt to execute the action set failed.

case actionSetExecutionPartialSuccess

An attempt to execute the action set was only partially successful.

case actionSetExecutionInProgress

An error indicating the execution of the action set is in progress.

case accessoryOutOfCompliance

An error indicating the accessory is out of compliance.

case dataResetFailure

An attempt to reset the data failed.

case notificationAlreadyEnabled

An error indicating the notification is already enabled.

case recurrenceMustBeOnSpecifiedBoundaries

An error indicating the recurrence rule is not on the specified boundaries.

case dateMustBeOnSpecifiedBoundaries

An error indicating the date is not on the specified boundaries.

case cannotActivateTriggerTooFarInFuture

An error indicating the trigger cannot be activated because it is set too far in the future.

case recurrenceTooLarge

An attempt to use a recurrence period that is too large.

case readWritePartialSuccess

An error indicating a partially successful read/write operation.

case readWriteFailure

An error indicating a failed read/write operation.

case notSignedIntoiCloud

An error indicating the user is not signed into iCloud.

case keychainSyncNotEnabled

An error indicating Keychain syncing is not enabled for the user.

case cloudDataSyncInProgress

An error indicating a data synchronization operation is in progress.

case networkUnavailable

An error indicating the network is unavailable.

case addAccessoryFailed

A failed attempt to add an accessory.

case missingEntitlement

An error indicating a required entitlement is not available.

case cannotUnblockNonBridgeAccessory

An error indicating a non-bridge accessory cannot be unblocked.

case deviceLocked

An error indicating the device is locked.

case cannotRemoveBuiltinActionSet

An error indicating the built-in action set cannot be removed.

case locationForHomeDisabled

An error indicating the home’s location is disabled.

case notAuthorizedForLocationServices

An error indicating location services are not authorized.

case referToUserManual

An error described in the device’s user manual.

case invalidOrMissingAuthorizationData

An error indicating the authorization data is invalid or missing.

case bridgedAccessoryNotReachable

An error indicating the bridged accessory cannot be reached.

case notAuthorizedForMicrophoneAccess

An error indicating microphone access is not authorized.

case incompatibleNetwork

An error indicating an incompatible network.

case noHomeHub

An error indicating no home hub found.

case noCompatibleHomeHub

An error indicating no compatible home hub found.

case incompatibleAccessory

The accessory is incompatible.

case objectWithSimilarNameExists

An object with a similar name already exists.

case ownershipFailure

The ownership code did not match.

case maximumAccessoriesOfTypeInHome

The home already has the maximum number of accessories of the given type.

case wiFiCredentialGenerationFailed

WiFi credential generation failed.

Deprecated Codes

static var incompatibleHomeHub: HMError.Code

An error indicating an incompatible home hub.

Deprecated

See Also

Error Codes

static var alreadyExists: HMError.Code

An error indicating the container already contains the object you are trying to add.

static var notFound: HMError.Code

An error indicating the object was not found in the container.

static var invalidParameter: HMError.Code

An error indicating the object is invalid for the given operation.

static var accessoryNotReachable: HMError.Code

An error indicating the accessory is not reachable over the network.

static var readOnlyCharacteristic: HMError.Code

An attempt to modify a read-only value.

static var writeOnlyCharacteristic: HMError.Code

An attempt to read from a write-only characteristic.

static var notificationNotSupported: HMError.Code

An attempt to register for notifications from an accessory that does not support notifications.

static var operationTimedOut: HMError.Code

An error indicating the operation timed out.

static var accessoryPoweredOff: HMError.Code

An error indicating the accessory is off.

static var accessDenied: HMError.Code

An error indicating the current user doesn’t have privileges to perform the operation.

static var objectAssociatedToAnotherHome: HMError.Code

An attempt to associate an object with a home when it’s already associated with another home.

static var objectNotAssociatedToAnyHome: HMError.Code

An attempt to perform an operation on an object that is not associated to any home.

static var objectAlreadyAssociatedToHome: HMError.Code

An attempt to associate an object with a home when it’s already associated with that home.

static var accessoryIsBusy: HMError.Code

An error indicating the accessory is busy.

static var operationInProgress: HMError.Code

An error indicating the operation is already in progress.

static var accessoryOutOfResources: HMError.Code

An error indicating the accessory is out of resources.

static var insufficientPrivileges: HMError.Code

An error indicating insufficient privileges for the operation.

static var accessoryPairingFailed: HMError.Code

An attempt to pair with the accessory has failed.

static var invalidDataFormatSpecified: HMError.Code

An error indicating an invalid data format was specified.

static var nilParameter: HMError.Code

An error indicating that nil was passed for an operation that does not accept nil.

static var unconfiguredParameter: HMError.Code

An error indicating an unconfigured parameter.

static var invalidClass: HMError.Code

An attempt to use an abstract base class in an operation instead of a concrete subclass.

static var operationCancelled: HMError.Code

An error indicating the user canceled the operation.

static var roomForHomeCannotBeInZone: HMError.Code

An attempt to add the room that represents the entire home to a zone.

static var noActionsInActionSet: HMError.Code

An attempt to execute an action set with no actions.

static var noRegisteredActionSets: HMError.Code

An attempt to activate a trigger with no action sets.

static var missingParameter: HMError.Code

An error indicating a missing parameter.

static var fireDateInPast: HMError.Code

An attempt to activate a timer trigger with a date in the past.

static var roomForHomeCannotBeUpdated: HMError.Code

An attempt to change the room that represents the entire home.

static var actionInAnotherActionSet: HMError.Code

An attempt to add an action that exists in one action set to another action set.

static var objectWithSimilarNameExistsInHome: HMError.Code

An attempt to give the name of one object to another object in the home.

static var homeWithSimilarNameExists: HMError.Code

An attempt to assign a home the same name as an existing home.

static var renameWithSimilarName: HMError.Code

An attempt to rename an object with its current name.

static var cannotRemoveNonBridgeAccessory: HMError.Code

An attempt to remove a bridged accessory.

static var nameContainsProhibitedCharacters: HMError.Code

An attempt to name an object with prohibited characters.

static var nameDoesNotStartWithValidCharacters: HMError.Code

An attempt to start the name of an object with invalid characters.

static var userIDNotEmailAddress: HMError.Code

An error indicating the user’s ID is not a valid email address.

static var userDeclinedAddingUser: HMError.Code

An error indicating the user canceled the add user operation.

static var userDeclinedRemovingUser: HMError.Code

An error indicating the user canceled the remove user operation.

static var userDeclinedInvite: HMError.Code

An error indicating the user declined the invitation.

static var userManagementFailed: HMError.Code

A user management error not covered by the other errors.

static var recurrenceTooSmall: HMError.Code

An error indicating the recurrence interval is too short.

static var invalidValueType: HMError.Code

An attempt to use an invalid value type.

static var valueLowerThanMinimum: HMError.Code

An attempt to use a numeric value lower than the specified minimum value.

static var valueHigherThanMaximum: HMError.Code

An attempt to use a numeric value higher than the specified maximum value.

static var stringLongerThanMaximum: HMError.Code

An attempt to use a string longer than the maximum allowed.

static var homeAccessNotAuthorized: HMError.Code

An error indicating access to the home is not authorized.

static var operationNotSupported: HMError.Code

An attempt to use an unsupported operation.

static var maximumObjectLimitReached: HMError.Code

An error indicating the maximum object count has been reached.

static var accessorySentInvalidResponse: HMError.Code

An error indicating the accessory sent an invalid response.

static var stringShorterThanMinimum: HMError.Code

An attempt to use a string shorter than the required minimum.

static var genericError: HMError.Code

An error that does not have a more specific error code.

static var invalidMessageSize: HMError.Code

An error indicating an invalid message size.

static var accessoryDiscoveryFailed: HMError.Code

An error indicating that accessory discovery failed.

static var clientRequestError: HMError.Code

An error with the client request.

static var accessoryResponseError: HMError.Code

An error with the accessory’s response.

static var nameDoesNotEndWithValidCharacters: HMError.Code

An error indicating the provided name has invalid characters at the end.

static var accessoryIsBlocked: HMError.Code

An error indicating a blocked accessory.

static var invalidAssociatedServiceType: HMError.Code

An error indicating an invalid service type.

static var actionSetExecutionFailed: HMError.Code

An attempt to execute the action set failed.

static var actionSetExecutionPartialSuccess: HMError.Code

An attempt to execute the action set was only partially successful.

static var actionSetExecutionInProgress: HMError.Code

An error indicating the execution of the action set is in progress.

static var accessoryOutOfCompliance: HMError.Code

An error indicating the accessory is out of compliance.

static var dataResetFailure: HMError.Code

An attempt to reset the data failed.

static var notificationAlreadyEnabled: HMError.Code

An error indicating the notification is already enabled.

static var recurrenceMustBeOnSpecifiedBoundaries: HMError.Code

An error indicating the recurrence rule is not on the specified boundaries.

static var dateMustBeOnSpecifiedBoundaries: HMError.Code

An error indicating the date is not on the specified boundaries.

static var cannotActivateTriggerTooFarInFuture: HMError.Code

An error indicating the trigger cannot be activated because it is set too far in the future.

static var recurrenceTooLarge: HMError.Code

An attempt to use a recurrence period that is too large.

static var readWritePartialSuccess: HMError.Code

An error indicating a partially successful read/write operation.

static var readWriteFailure: HMError.Code

An error indicating a failed read/write operation.

static var notSignedIntoiCloud: HMError.Code

An error indicating the user is not signed into iCloud.

static var keychainSyncNotEnabled: HMError.Code

An error indicating Keychain syncing is not enabled for the user.

static var cloudDataSyncInProgress: HMError.Code

An error indicating a data synchronization operation is in progress.

static var networkUnavailable: HMError.Code

An error indicating the network is unavailable.

static var addAccessoryFailed: HMError.Code

A failed attempt to add an accessory.

static var missingEntitlement: HMError.Code

An error indicating a required entitlement is not available.

static var cannotUnblockNonBridgeAccessory: HMError.Code

An error indicating a non-bridge accessory cannot be unblocked.

static var deviceLocked: HMError.Code

An error indicating the device is locked.

static var cannotRemoveBuiltinActionSet: HMError.Code

An error indicating the built-in action set cannot be removed.

static var locationForHomeDisabled: HMError.Code

An error indicating the home’s location is disabled.

static var notAuthorizedForLocationServices: HMError.Code

An error indicating location services are not authorized.

static var referToUserManual: HMError.Code

An error described in the device’s user manual.

static var invalidOrMissingAuthorizationData: HMError.Code

An error indicating the authorization data is invalid or missing.

static var bridgedAccessoryNotReachable: HMError.Code

An error indicating the bridged accessory cannot be reached.

static var notAuthorizedForMicrophoneAccess: HMError.Code

An error indicating microphone access is not authorized.

static var incompatibleNetwork: HMError.Code

An error indicating an incompatible network.

static var noHomeHub: HMError.Code

An error indicating no home hub found.

static var noCompatibleHomeHub: HMError.Code

An error indicating no compatible home hub found.

static var incompatibleHomeHub: HMError.Code

An error indicating an incompatible home hub.

Deprecated
static var incompatibleHomeHub: HMError.Code

No compatible home hub found.

Deprecated
static var objectWithSimilarNameExists: HMError.Code

An object with a similar name already exists.

static var ownershipFailure: HMError.Code

The ownership code did not match.

static var maximumAccessoriesOfTypeInHome: HMError.Code

The home already has the maximum number of accessories of the given type.