<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DockKit",
  "identifier" : "/documentation/DockKit/DockAccessory/StateChange",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "DockKit"
    ],
    "preciseIdentifier" : "s:7DockKit0A9AccessoryC11StateChangeV"
  },
  "title" : "DockAccessory.StateChange"
}
-->

# DockAccessory.StateChange

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

```
struct StateChange
```

## 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`](/documentation/DockKit/DockAccessoryManager/accessoryStateChanges).

## Topics

### Getting properties

[`accessory`](/documentation/DockKit/DockAccessory/StateChange/accessory)

The dock accessory that generated the event.

[`state`](/documentation/DockKit/DockAccessory/StateChange/state)

The state of the dock accessory associated with the event.



---

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)