---
title: resetHandler
framework: corehaptics
role: symbol
role_heading: Instance Property
path: corehaptics/chhapticengine/resethandler-swift.property
---

# resetHandler

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

## Declaration

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

## Discussion

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 objects and CHHapticEngine properties across restarts. Consider trying to restart the engine inside the reset block. Callbacks to this block arrive on a non-main thread, so handle them in a thread-safe manner.

## See Also

### Handling Haptic Engine Resets

- [CHHapticEngine.ResetHandler](corehaptics/chhapticengine/resethandler-swift.typealias.md)
