<!--
{
  "availability" : [
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVInterfaceMetadata/initWithTemplate:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "c:objc(cs)AVInterfaceMetadata(im)initWithTemplate:"
  },
  "title" : "initWithTemplate:"
}
-->

# initWithTemplate:

Initializes a new metadata object by copying values from a metadata template.

```
- (instancetype) initWithTemplate:(AVInterfaceMetadataTemplate *) metadataTemplate;
```

## Parameters

`metadataTemplate`

The metadata template to copy values from. If nil, returns a metadata object with default values.

## Discussion

This initializer creates an immutable `AVInterfaceMetadata` instance from a mutable
`AVInterfaceMetadataTemplate`, providing a convenient way to convert configured template
data into stable metadata for playback interfaces.

All properties from the template are copied into the new metadata object, creating an
independent immutable snapshot of the template’s current state. Subsequent changes to
the template will not affect the created metadata object.

---

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)