---
title: CHHapticEngine.StoppedHandler
framework: corehaptics
role: symbol
role_heading: Type Alias
path: corehaptics/chhapticengine/stoppedhandler-swift.typealias
---

# CHHapticEngine.StoppedHandler

A typealias for the block that the haptic engine calls after it stops due to an external cause.

## Declaration

```swift
typealias StoppedHandler = (CHHapticEngine.StoppedReason) -> Void
```

## Discussion

Discussion The system calls the stopped handler for when it’s stopped by an external event like an audio session interruption or an auto-shutdown. note: The stopped handler isn’t called if you explicitly stop the engine by calling the stop(completionHandler:) method.

## See Also

### Handling Haptic Engine Stoppages

- [stoppedHandler](corehaptics/chhapticengine/stoppedhandler-swift.property.md)
- [CHHapticEngine.StoppedReason](corehaptics/chhapticengine/stoppedreason.md)
