---
title: DockAccessory.StateChange
framework: dockkit
role: symbol
role_heading: Structure
path: dockkit/dockaccessory/statechange
---

# DockAccessory.StateChange

An event that indicates a change in the state of a dock accessory.

## Declaration

```swift
struct StateChange
```

## Overview

Overview DockKit generates this event when a device docks or undocks from the dock accessory, or when a person presses the tracking button. To iterate the stream of state changes, see accessoryStateChanges.

## Topics

### Getting properties

- [accessory](dockkit/dockaccessory/statechange/accessory.md)
- [state](dockkit/dockaccessory/statechange/state.md)

### Instance Properties

- [trackingButtonEnabled](dockkit/dockaccessory/statechange/trackingbuttonenabled.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Getting accessory information

- [firmwareVersion](dockkit/dockaccessory/firmwareversion.md)
- [hardwareModel](dockkit/dockaccessory/hardwaremodel.md)
- [identifier](dockkit/dockaccessory/identifier-swift.property.md)
- [DockAccessory.Identifier](dockkit/dockaccessory/identifier-swift.struct.md)
- [DockAccessory.Category](dockkit/dockaccessory/category.md)
- [DockAccessory.State](dockkit/dockaccessory/state.md)
- [DockAccessory.StateChanges](dockkit/dockaccessory/statechanges.md)
