<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreHaptics",
  "identifier" : "/documentation/CoreHaptics/CHHapticEngine/resetHandler-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Haptics"
    ],
    "preciseIdentifier" : "c:objc(cs)CHHapticEngine(py)resetHandler"
  },
  "title" : "resetHandler"
}
-->

# resetHandler

A block that the haptic engine calls after recovering from a haptic server error.

```
var resetHandler: CHHapticEngine.ResetHandler { get set }
```

## Discussion

If the handler has to reset itself after a server failure, the system calls this block asynchronously. In this block, release all haptic pattern players and recreate them. The system preserves [`CHHapticPattern`](/documentation/CoreHaptics/CHHapticPattern) objects and [`CHHapticEngine`](/documentation/CoreHaptics/CHHapticEngine) properties across restarts. Consider trying to restart the engine inside the reset block.

```swift
self.hapticEngine.resetHandler = {
    print("Engine reset --> Restarting!")
    do {
        try self.hapticEngine.start()
    } catch {
        print("Failed to restart the engine: \(error)")
    }
}
```

Callbacks to this block arrive on a non-main thread, so handle them in a thread-safe manner.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)