---
title: "metadata(forFormat:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avassettrack/metadata(forformat:)"
---

# metadata(forFormat:)

Returns metadata items that a track contains for the specified format.

## Declaration

```swift
func metadata(forFormat format: AVMetadataFormat) -> [AVMetadataItem]
```

## Parameters

- `format`: The format of the metadata items to retrieve.

## Return Value

Return Value An array of metadata items matching the specified format, or an empty array if none are found.

## Discussion

Discussion Apple discourages the use of this method in iOS 15, tvOS 15, and macOS 12 or later. Load track metadata asynchronously using loadMetadata(for:completionHandler:) instead. You can call this method without blocking the current thread after you’ve loaded the availableMetadataFormats property.
