---
title: "connectNetwork(with:expectedValues:expectedValueInterval:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrclusternetworkcommissioning/connectnetwork(with:expectedvalues:expectedvalueinterval:completion:)"
---

# connectNetwork(with:expectedValues:expectedValueInterval:completion:)

## Declaration

```swift
func connectNetwork(with params: MTRNetworkCommissioningClusterConnectNetworkParams, expectedValues expectedDataValueDictionaries: [[String : Any]]?, expectedValueInterval expectedValueIntervalMs: NSNumber?, completion: @escaping @Sendable (MTRNetworkCommissioningClusterConnectNetworkResponseParams?, (any Error)?) -> Void)
```

```swift
func connectNetwork(with params: MTRNetworkCommissioningClusterConnectNetworkParams, expectedValues expectedDataValueDictionaries: [[String : Any]]?, expectedValueInterval expectedValueIntervalMs: NSNumber?) async throws -> MTRNetworkCommissioningClusterConnectNetworkResponseParams
```
