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

# track(_:cameraInformation:image:)

Automatically generate and send tracking vectors to the device.

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

## Parameters

`metadata`

An array of <doc://com.apple.documentation/documentation/AVFoundation/AVMetadataObject> objects indicating the location of objects within the frame.

`cameraInformation`

The camera in current use and its orientation.

`image`

The captured camera image buffer.

## Discussion

The vectors are based on metadata coming from the camera.

Disable system tracking, then supply the observations at a fixed rate between 10 and 30 times per second. Any other rate is unsupported.

> 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)