Structure

CHHapticError

A struct representing an error in the haptics process.

Declaration

struct CHHapticError

Topics

Parsing an Error

var errorCode: Int

An integral error code.

var errorUserInfo: [String : Any]

User information about the error.

var localizedDescription: String

A localized description of the error.

static func != (CHHapticError, CHHapticError) -> Bool

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

let CoreHapticsErrorDomain: String

A string representation of the haptic error domain.

Defining Error Types

static var errorDomain: String

A static string representation of the error domain.

enum CHHapticError.Code

Haptic error codes.

static var engineNotRunning: CHHapticError.Code

The haptic engine wasn't running when your app requested pattern playback.

static var engineStartTimeout: CHHapticError.Code

The haptic engine timed out while starting.

static var invalidParameterType: CHHapticError.Code

Your app entered an invalid CHHapticParameterID or CHHapticEvent.ParameterID.

static var invalidPatternData: CHHapticError.Code

Your app fed an invalid pattern to the haptic engine or player.

static var invalidPatternPlayer: CHHapticError.Code

The current pattern player is no longer valid due to a server error.

static var invalidAudioSession: CHHapticError.Code

The current pattern player is associated with an invalid audio session.

static var memoryError: CHHapticError.Code

The operation failed due to a lack of memory.

static var notSupported: CHHapticError.Code

The current device doesn't support the haptic engine.

static var operationNotPermitted: CHHapticError.Code

Your app requested an operation that the haptic engine disallows.

static var serverInitFailed: CHHapticError.Code

The haptic server failed to initialize.

static var serverInterrupted: CHHapticError.Code

Your app lost its connection to the haptic server.

static var badEventEntry: CHHapticError.Code

The event described in the dictionary is missing a required field.

static var badParameterEntry: CHHapticError.Code

A parameter in an event is missing a required field.

static var invalidAudioResource: CHHapticError.Code

The audio resource linked in the entry is invalid.

static var resourceNotAvailable: CHHapticError.Code

Core Haptics couldn't locate the named resource.

static var invalidEventDuration: CHHapticError.Code

The event described in the dictionary has an invalid duration.

static var invalidEventTime: CHHapticError.Code

The event time described in the dictionary is invalid.

static var invalidTime: CHHapticError.Code

The time offset passed to Core Haptics is invalid.

static var invalidPatternDictionary: CHHapticError.Code

A pattern in the dictionary is missing a required field.

static var unknownError: CHHapticError.Code

Core Haptics couldn't determine the source of error.

See Also

Haptic Errors

enum CHHapticError.Code

Haptic error codes.

let CoreHapticsErrorDomain: String

A string representation of the haptic error domain.