---
title: "getDeviceController(withFabricId:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrdevicecontrollerserverprotocol/getdevicecontroller(withfabricid:completion:)"
---

# getDeviceController(withFabricId:completion:)

## Declaration

```swift
optional func getDeviceController(withFabricId fabricId: UInt64, completion: @escaping @Sendable (Any?, (any Error)?) -> Void)
```

```swift
optional func deviceController(withFabricId fabricId: UInt64) async throws -> Any
```
