<!--
{
  "availability" : [
    "iOS: 9.3.0 -",
    "iPadOS: 9.3.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.3 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerItemMetadataCollector/setDelegate(_:queue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerItemMetadataCollector(im)setDelegate:queue:"
  },
  "title" : "setDelegate(_:queue:)"
}
-->

# setDelegate(_:queue:)

Sets the delegate and a dispatch queue on which the delegate will be called.

```
func setDelegate(_ delegate: (any AVPlayerItemMetadataCollectorPushDelegate)?, queue delegateQueue: dispatch_queue_t?)
```

## Parameters

`delegate`

An object conforming to [`AVPlayerItemMetadataCollectorPushDelegate`](/documentation/AVFoundation/AVPlayerItemMetadataCollectorPushDelegate) protocol.

`delegateQueue`

A dispatch queue on which all delegate methods will be called.

## Discussion

---

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)