capabilitiesForHardware
TypeScriptstatic capabilitiesForHardware(): SDKHandleSwift declarationclass func capabilitiesForHardware() -> any CHHapticDeviceCapabilityclass · iOS 13.0+ · SDK 27.1
class CHHapticEnginestatic capabilitiesForHardware(): SDKHandleSwift declarationclass func capabilitiesForHardware() -> any CHHapticDeviceCapabilitymakeAdvancedPlayer(pattern: CHHapticPattern): SDKHandleSwift declarationfunc makeAdvancedPlayer(with pattern: CHHapticPattern) throws -> any CHHapticAdvancedPatternPlayermakePlayer(pattern: CHHapticPattern): SDKHandleSwift declarationfunc makePlayer(with pattern: CHHapticPattern) throws -> any CHHapticPatternPlayerstatic init(): CHHapticEngineSwift declarationinit() throwsstatic initAudioSession(audioSession?: (_AVFAudio_AVAudioSession) | null): CHHapticEngineSwift declarationinit(audioSession: AVAudioSession?) throwsplayPatternFrom(data: ArrayBuffer): voidSwift declarationfunc playPattern(from data: Data) throwsplayPatternFrom83173(fileURL: string): voidSwift declarationfunc playPattern(from fileURL: URL) throwsregisterAudioResource(resourceURL: string, options?: NativeMap<unknown, unknown>): numberSwift declarationfunc registerAudioResource(_ resourceURL: URL, options: [AnyHashable : Any] = [:]) throws -> CHHapticAudioResourceIDstart(): voidSwift declarationfunc start() throwsstartCompletionHandler(completionHandler?: (((arg0: (NativeError) | null) => void)) | null): voidSwift declarationfunc start() async throwsstop(completionHandler?: (((arg0: (NativeError) | null) => void)) | null): voidSwift declarationfunc stop() async throwsunregisterAudioResource(resourceID: number): voidSwift declarationfunc unregisterAudioResource(_ resourceID: CHHapticAudioResourceID) throwsget isAutoShutdownEnabled(): booleanSwift declarationvar isAutoShutdownEnabled: Bool { get set }set isAutoShutdownEnabled(value: boolean)Swift declarationvar isAutoShutdownEnabled: Bool { get set }get currentTime(): numberSwift declarationvar currentTime: TimeInterval { get }get isMutedForAudio(): booleanSwift declarationvar isMutedForAudio: Bool { get set }set isMutedForAudio(value: boolean)Swift declarationvar isMutedForAudio: Bool { get set }get isMutedForHaptics(): booleanSwift declarationvar isMutedForHaptics: Bool { get set }set isMutedForHaptics(value: boolean)Swift declarationvar isMutedForHaptics: Bool { get set }get playsAudioOnly(): booleanSwift declarationvar playsAudioOnly: Bool { get set }set playsAudioOnly(value: boolean)Swift declarationvar playsAudioOnly: Bool { get set }get playsHapticsOnly(): booleanSwift declarationvar playsHapticsOnly: Bool { get set }set playsHapticsOnly(value: boolean)Swift declarationvar playsHapticsOnly: Bool { get set }get resetHandler(): (() => Promise<void>)Swift declarationvar resetHandler: CHHapticEngine.ResetHandler { get set }set resetHandler(value: (() => void))Swift declarationvar resetHandler: CHHapticEngine.ResetHandler { get set }get stoppedHandler(): ((arg0: CHHapticEngine_StoppedReason) => Promise<void>)Swift declarationvar stoppedHandler: CHHapticEngine.StoppedHandler { get set }set stoppedHandler(value: ((arg0: CHHapticEngine_StoppedReason) => void))Swift declarationvar stoppedHandler: CHHapticEngine.StoppedHandler { get set }1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
CHHapticEngine.notifyWhenPlayersFinished(finishedHandler:)
callback cannot propagate synchronous failure