Initializer

init()

Creates an instance of the haptic engine.

Declaration

init() throws

Parameters

error

An error that contains information about failed engine creation, or nil if no error occurred.

Discussion

The haptic engine is not a singleton but a connection to the haptic server inside the user's device. More than one connection with the haptic server may exist in your app's view controller or delegate. Each connection functions independently of the others.

See Also

Initializing a Haptic Engine

init(audioSession: AVAudioSession?)

Creates a haptic engine from an audio session.