<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Matter",
  "identifier" : "/documentation/Matter/MTRDevice/add(_:queue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Matter"
    ],
    "preciseIdentifier" : "c:objc(cs)MTRDevice(im)addDelegate:queue:"
  },
  "title" : "add(_:queue:)"
}
-->

# add(_:queue:)

Adds a delegate to receive asynchronous callbacks about the device.

```
func add(_ delegate: any MTRDeviceDelegate, queue: dispatch_queue_t)
```

## Discussion

The delegate will be called on the provided queue, for attribute reports, event reports, and device state changes.

MTRDevice holds a weak reference to the delegate 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)