<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Matter",
  "identifier" : "/documentation/Matter/MTRXPCDeviceControllerParameters/init(xpcConnectionBlock:uniqueIdentifier:)-9ep5u",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Matter"
    ],
    "preciseIdentifier" : "c:objc(cs)MTRXPCDeviceControllerParameters(im)initWithXPCConnectionBlock:uniqueIdentifier:"
  },
  "title" : "init(xpcConnectionBlock:uniqueIdentifier:)"
}
-->

# init(xpcConnectionBlock:uniqueIdentifier:)

A controller created from this way will connect to a remote instance of an MTRDeviceController loaded in an XPC Service

```
init(xpcConnectionBlock: @escaping () -> NSXPCConnection, uniqueIdentifier: UUID)
```

## Parameters

`xpcConnectionBlock`

The XPC Connection block that will return an NSXPCConnection to the intended listener.

`uniqueIdentifier`

The unique id to assign to the controller.

---

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)