<!--
{
  "availability" : [
    "iOS: 16.1.0 -",
    "iPadOS: 16.1.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "MatterSupport",
  "identifier" : "/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MatterSupport"
    ],
    "preciseIdentifier" : "c:@M@MatterSupport@objc(cs)MatterAddDeviceExtensionRequestHandler"
  },
  "title" : "MatterAddDeviceExtensionRequestHandler"
}
-->

# MatterAddDeviceExtensionRequestHandler

The object that handles configuration and commissioning of a device into an ecosystem.

```
@objc class MatterAddDeviceExtensionRequestHandler
```

## Overview

This class facilitates the user interface flow during the setup of a new Matter device. Subclass this class and override its methods, except for `beginRequest(with:)`. The principal class for the app’s extension declared by the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSPrincipalClass> in the extension plist must inherit from this base class.

If the [`MatterAddDeviceRequest.Topology`](/documentation/MatterSupport/MatterAddDeviceRequest/Topology-swift.struct) object in the request has two or more homes, the user interface flow displays a picker to allow selection of a home. If the object contains one home, that home is the selected home and the user interface flow doesn’t display a picker. If the object contains no home, then the user interface flow doesn’t display a picker, and any methods take a home parameter receive `nil`.

> Note: Don’t call `super` within the overridden method.

## Topics

### Creating the request handler

[`init()`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/init())

### Configuring and validating the device

[`configureDevice(named:in:)`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/configureDevice(named:in:))

Configures the device with selected attributes.

[`validateDeviceCredential(_:)`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/validateDeviceCredential(_:))

Performs verification and attestation checks.

[`MatterAddDeviceExtensionRequestHandler.DeviceCredential`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/DeviceCredential)

A collection of device credentials the device presents during commissioning.

[`rooms(in:)`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/rooms(in:))

Provides rooms that correspond to a home in the device setup.

### Starting the request

### Commissioning the device

[`commissionDevice(in:onboardingPayload:commissioningID:)`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/commissionDevice(in:onboardingPayload:commissioningID:))

Commissions the device with the onboarding payload.

### Selecting the Thread network

[`selectThreadNetwork(from:)`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/selectThreadNetwork(from:))

Provides the visible Thread networks to the device.

[`MatterAddDeviceExtensionRequestHandler.ThreadScanResult`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/ThreadScanResult)

A result of a Thread-scan operation performed on the device

[`MatterAddDeviceExtensionRequestHandler.ThreadNetworkAssociation`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/ThreadNetworkAssociation)

The description of an association to a Thread network.

### Selecting the Wi-Fi network

[`selectWiFiNetwork(from:)`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/selectWiFiNetwork(from:))

Provides the visible Wi-Fi networks to the Matter device.

[`MatterAddDeviceExtensionRequestHandler.WiFiScanResult`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/WiFiScanResult)

A result of a Wi-Fi-scan operation performed on the device

[`MatterAddDeviceExtensionRequestHandler.WiFiNetworkAssociation`](/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/WiFiNetworkAssociation)

The description of an association to a Wi-Fi network.



---

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)