---
title: "init(xpcConnectionBlock:uniqueIdentifier:)"
framework: matter
role: symbol
role_heading: Initializer
path: "matter/mtrxpcdevicecontrollerparameters/init(xpcconnectionblock:uniqueidentifier:)-9ep5u"
---

# init(xpcConnectionBlock:uniqueIdentifier:)

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

## Declaration

```swift
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.
