<!--
{
  "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/setRDD18AncillaryDataString(_:forTag:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureAncillaryDataEncoder(im)setRDD18AncillaryDataString:forTag:error:"
  },
  "title" : "setRDD18AncillaryDataString(_:forTag:)"
}
-->

# setRDD18AncillaryDataString(_:forTag:)

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

```
func setRDD18AncillaryDataString(_ string: String, forTag tag: UInt16) throws
```

## Parameters

`string`

The string to be encoded as data 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)