---
title: "sharedController(withId:xpcConnect:)"
framework: matter
role: symbol
role_heading: Type Method
path: "matter/mtrdevicecontroller/sharedcontroller(withid:xpcconnect:)-6rg64"
---

# sharedController(withId:xpcConnect:)

## Declaration

```swift
class func sharedController(withId controllerID: (any NSCopying)?, xpcConnect xpcConnectBlock: @escaping MTRXPCConnectBlock) -> MTRDeviceController
```
