A request that adds and sets up a device into an ecosystem.
Members (12)
get · iOS 16.1+
showDeviceCriteria
TypeScript
get showDeviceCriteria(): MatterAddDeviceRequest_DeviceCriteria
Swift declaration
var showDeviceCriteria: MatterAddDeviceRequest.DeviceCriteria
A predicate that filters what devices appear in the picker.
During setup user interface flows, the system may present a picker to choose the device to set up. Only devices that match the specified criteria appear in the picker.
Use `.allDevices` to display all devices. Use `.not(...)` to hide blocked devices, such as those already paired in the ecosystem.
set · iOS 16.1+
showDeviceCriteria
TypeScript
set showDeviceCriteria(value: MatterAddDeviceRequest_DeviceCriteria)
Swift declaration
var showDeviceCriteria: MatterAddDeviceRequest.DeviceCriteria
A predicate that filters what devices appear in the picker.
During setup user interface flows, the system may present a picker to choose the device to set up. Only devices that match the specified criteria appear in the picker.
Use `.allDevices` to display all devices. Use `.not(...)` to hide blocked devices, such as those already paired in the ecosystem.
get · iOS 17.0+
isSupported
TypeScript
static get isSupported(): boolean
Swift declaration
static var isSupported: Bool { get }
A flag that indicates whether `MatterAddDeviceRequest` usage is supported
get · iOS 16.1+
setupPayload
TypeScript
get setupPayload(): (_Matter_MTRSetupPayload) | null
Swift declaration
var setupPayload: MTRSetupPayload?
The payload to use for Matter device setup.
This is an optional field for a setup to be able to complete. If this is provided, the QR-Code selection is skipped.
Use of this field requires an entitlement in the application ([`com.apple.developer.matter.allow-setup-payload`](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_matter_allow-setup-payload)).
set · iOS 16.1+
setupPayload
TypeScript
set setupPayload(value: (_Matter_MTRSetupPayload) | null)
Swift declaration
var setupPayload: MTRSetupPayload?
The payload to use for Matter device setup.
This is an optional field for a setup to be able to complete. If this is provided, the QR-Code selection is skipped.
Use of this field requires an entitlement in the application ([`com.apple.developer.matter.allow-setup-payload`](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_matter_allow-setup-payload)).
get · iOS 16.4+
shouldScanNetworks
TypeScript
get shouldScanNetworks(): boolean
Swift declaration
var shouldScanNetworks: Bool
A flag that indicates whether to receive network scan results.
The app receives the network scan results, or an empty list if no scan occurred.
Even if the property is set to `true`, the scan may not occur if the accessory doesn't support scanning.
set · iOS 16.4+
shouldScanNetworks
TypeScript
set shouldScanNetworks(value: boolean)
Swift declaration
var shouldScanNetworks: Bool
A flag that indicates whether to receive network scan results.
The app receives the network scan results, or an empty list if no scan occurred.
Even if the property is set to `true`, the scan may not occur if the accessory doesn't support scanning.
method · iOS 16.1+
perform
TypeScript
perform(): Promise<void>
Swift declaration
func perform() async throws
Launch the user interface to set up a Matter device in the ecosystem.
Create the request with an optional network scan.
- Parameters:
- topology: The topology of the home.
- setupPayload: The setup payload.
- showing: The criteria that determines which device appears in the picker.
- shouldScanNetworks: A flag that determines whether to request a network scan.
Create the request.
- Parameters:
- topology: The topology of the home.
- setupPayload: The setup payload.
- showing: The criteria that determines which device appears in the picker.
get · iOS 16.1+
topology
TypeScript
get topology(): MatterAddDeviceRequest_Topology
Swift declaration
var topology: MatterAddDeviceRequest.Topology
A configuration object representing the topology of the initiating ecosystem.
set · iOS 16.1+
topology
TypeScript
set topology(value: MatterAddDeviceRequest_Topology)
Swift declaration
var topology: MatterAddDeviceRequest.Topology
A configuration object representing the topology of the initiating ecosystem.