<!--
{
  "availability" : [
    "iOS: 16.1.0 -",
    "iPadOS: 16.1.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "MatterSupport",
  "identifier" : "/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/selectThreadNetwork(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MatterSupport"
    ],
    "preciseIdentifier" : "s:13MatterSupport0A32AddDeviceExtensionRequestHandlerC19selectThreadNetwork4fromAC0iJ11AssociationVSayAC0I10ScanResultVG_tYaKF"
  },
  "title" : "selectThreadNetwork(from:)"
}
-->

# selectThreadNetwork(from:)

Provides the visible Thread networks to the device.

```
func selectThreadNetwork(from threadScanResults: [MatterAddDeviceExtensionRequestHandler.ThreadScanResult]) async throws -> MatterAddDeviceExtensionRequestHandler.ThreadNetworkAssociation
```

## Return Value

The Thread network to join, or [`defaultSystemNetwork`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/ThreadNetworkAssociation/defaultSystemNetwork).

## Discussion

The Matter device provides information about the visible Thread networks that it sees. This allows the ecosystem to choose the correct network for the device to use.

The system may provide the selected Thread network in the completion handler. The device commissions onto the specified network.
The device must be able to send the device IP traffic after it associates to the given network.
Otherwise, if the system returns [`defaultSystemNetwork`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/ThreadNetworkAssociation/defaultSystemNetwork), the device commissions onto the Preferred Thread network known to the device.

Store credentials for the provided Thread network by calling <doc://com.apple.documentation/documentation/ThreadNetwork/THClient/storeCredentials(forBorderAgent:activeOperationalDataSet:completion:)> before
completing this callback.

If the Matter device is already commissioned with a network, the selected network may do nothing.

---

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)