<!--
{
  "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/track(_:cameraInformation:image:)-3uuza",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DockKit"
    ],
    "preciseIdentifier" : "s:7DockKit0A9AccessoryC5track_17cameraInformation5imageySayAC11ObservationVG_AC06CameraF0VSo11CVBufferRefatYaKF"
  },
  "title" : "track(_:cameraInformation:image:)"
}
-->

# track(_:cameraInformation:image:)

Automatically generate and send tracking vectors to the device.

```
final func track(_ data: [DockAccessory.Observation], cameraInformation: DockAccessory.CameraInformation, image: CVPixelBuffer) async throws
```

## Parameters

`data`

An array of [`DockAccessory.Observation`](/documentation/DockKit/DockAccessory/Observation) objects indicating the location of objects of interest in the frame.

`cameraInformation`

The camera currently being used, and the orientation of the device.

`image`

The captured camera image buffer.

## Discussion

The device receives tracking vectors based on manually constructed observations.

Disable system tracking, then supply the observations at a fixed rate between 10 and 30 times per second. Any other rate is unsupported.
Calling this method without first disabling system tracking is a fatal error.

> Throws: ``doc://com.apple.DockKit/documentation/DockKit/DockKitError/notSupported`` if called on macOS.

---

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)