<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureAncillaryDataEncoder/setRDD18AncillaryData(_:forTag:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureAncillaryDataEncoder(im)setRDD18AncillaryData:forTag:error:"
  },
  "title" : "setRDD18AncillaryData(_:forTag:)"
}
-->

# setRDD18AncillaryData(_:forTag:)

Allows the user to add their own data to be encoded and transmitted using SMPTE RDD 18 standards.

```
func setRDD18AncillaryData(_ data: Data, forTag tag: UInt16) throws
```

## Parameters

`data`

The data to be encoded and transmitted

`tag`

The SMPTE RDD 18 tag with value between 0xE011 and 0xFFFF or valid tags definded in SMPTE RDD 18:2021

---

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)