<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "DockKit"
    ],
    "preciseIdentifier" : "s:7DockKit0A9AccessoryC"
  },
  "title" : "DockAccessory"
}
-->

# DockAccessory

Obtain accessory information and control tracking behavior.

```
final class DockAccessory
```

## Overview

`DockAccessory` provides information about the dock accessory including its model name and firmware version. It also controls the dock accessory when you disable system tracking. Use `DockAccesory` to  perform animations, or explicitly control the position of the dock accessory in three-dimensional space by supplying coordinates in units of radians.  The collection of the X, Y, and Z values corresponding to pitch, yaw, and roll is the *angular position* of the dock accessory.

If there are multiple subjects in a video frame, direct the dock accessory to focus on a particular area of the frame using [`setFramingMode(_:)`](/documentation/DockKit/DockAccessory/setFramingMode(_:)).

> Important: DockKit throws a ``doc://com.apple.DockKit/documentation/DockKit/DockKitError/frameRateTooHigh`` exception if you animate or set the orientation of the dock accessory too quickly, so keep call rates at 2 times per second or less.

## Topics

### Selecting and tracking

[`selectSubject(at:)`](/documentation/DockKit/DockAccessory/selectSubject(at:))

Selects a subject to track at the supplied coordinates.

[`track(_:cameraInformation:)`](/documentation/DockKit/DockAccessory/track(_:cameraInformation:)-4yl9b)

Automatically generate and send tracking vectors to the device.

[`track(_:cameraInformation:)`](/documentation/DockKit/DockAccessory/track(_:cameraInformation:)-44mwn)

Automatically generate and send tracking vectors to the device.

[`DockAccessory.Observation`](/documentation/DockKit/DockAccessory/Observation)

An observation of the contents of a single video frame.

[`DockAccessory.CameraInformation`](/documentation/DockKit/DockAccessory/CameraInformation)

A collection of tracking information about the camera currently in use.

[`DockAccessory.CameraOrientation`](/documentation/DockKit/DockAccessory/CameraOrientation)

The set of camera orientations used to extract coordinates.

### Performing animation

[`animate(motion:)`](/documentation/DockKit/DockAccessory/animate(motion:))

Starts an animation sequence.

[`setRegionOfInterest(_:)`](/documentation/DockKit/DockAccessory/setRegionOfInterest(_:))

Sets the area in the video frame in which the dock accessory tracks a subject.

[`regionOfInterest`](/documentation/DockKit/DockAccessory/regionOfInterest)

The area in the video frame in which the dock accessory tracks a subject.

[`DockAccessory.Animation`](/documentation/DockKit/DockAccessory/Animation)

Character animations that describe how to move the dock accessory.

### Setting position and limits

[`setLimits(_:)`](/documentation/DockKit/DockAccessory/setLimits(_:))

Sets limits for the axes of rotation.

[`setOrientation(_:duration:relative:)`](/documentation/DockKit/DockAccessory/setOrientation(_:duration:relative:)-2epe2)

Sets the position of each axis of orientation to radians for pitch, yaw, and roll.

[`setOrientation(_:duration:relative:)`](/documentation/DockKit/DockAccessory/setOrientation(_:duration:relative:)-6b0fl)

Sets the position of each axis of orientation to radians for pitch, yaw, and roll.

[`setAngularVelocity(_:)`](/documentation/DockKit/DockAccessory/setAngularVelocity(_:))

Sets the angular velocity of each axis of orientation.

### Setting framing mode

[`setFramingMode(_:)`](/documentation/DockKit/DockAccessory/setFramingMode(_:))

Customize the dock accessory’s tracking behavior.

[`framingMode`](/documentation/DockKit/DockAccessory/framingMode-swift.property)

The current framing mode.

[`DockAccessory.FramingMode`](/documentation/DockKit/DockAccessory/FramingMode-swift.enum)

The mode to control framing of the subject when tracking.

### Getting position and limits

[`motionStates`](/documentation/DockKit/DockAccessory/motionStates-swift.property)

Motion information from the dock accessory that includes current orientation and velocity of all axes.

[`limits`](/documentation/DockKit/DockAccessory/limits-swift.property)

Current limits for the axes of rotation and maximum angular velocity.

[`DockAccessory.MotionState`](/documentation/DockKit/DockAccessory/MotionState)

An event that indicates the state of a dock accessory’s current position and speed.

[`DockAccessory.MotionStates`](/documentation/DockKit/DockAccessory/MotionStates-swift.struct)

An asynchronous sequence of orientation and velocity updates from the device.

[`DockAccessory.Limits`](/documentation/DockKit/DockAccessory/Limits-swift.struct)

Soft limits on multiple axes of rotation.

### Getting accessory information

[`firmwareVersion`](/documentation/DockKit/DockAccessory/firmwareVersion)

The firmware version of the dock accessory.

[`hardwareModel`](/documentation/DockKit/DockAccessory/hardwareModel)

The model of the dock accessory.

[`identifier`](/documentation/DockKit/DockAccessory/identifier-swift.property)

The name and unique identifer of the dock accessory.

[`DockAccessory.Identifier`](/documentation/DockKit/DockAccessory/Identifier-swift.struct)

Information that uniquely identifies the dock accessory.

[`DockAccessory.Category`](/documentation/DockKit/DockAccessory/Category)

Types of supported dock accesories.

[`DockAccessory.State`](/documentation/DockKit/DockAccessory/State)

The state of a dock accessory.

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

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

[`DockAccessory.StateChanges`](/documentation/DockKit/DockAccessory/StateChanges)

An asynchronous sequence of dock accessory state changes.

### Inspecting the object

[`hash(into:)`](/documentation/DockKit/DockAccessory/hash(into:))

Creates a unique identifier representing the object.

[`debugDescription`](/documentation/DockKit/DockAccessory/debugDescription)

The text description of the dock accessory state.



---

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)