---
title: "init(_:access:onSelect:label:fallback:parameters:)"
framework: devicediscoveryui
role: symbol
role_heading: Initializer
path: "devicediscoveryui/devicepicker/init(_:access:onselect:label:fallback:parameters:)"
---

# init(_:access:onSelect:label:fallback:parameters:)

Creates a view that displays the available devices with the access level, section handler, and other parameters you supply.

## Declaration

```swift
@MainActor @preconcurrency init<Provider>(_ browserProvider: Provider, access: DDDevicePairingAccess = .default, onSelect: @escaping (Provider.Endpoint) -> Void, @ViewBuilder label: () -> Label, @ViewBuilder fallback: () -> Fallback, parameters: (() -> NWParameters)? = nil) where Provider : BrowserProvider
```

## Parameters

- `browserProvider`: An object that conforms to the doc://com.apple.documentation/documentation/Network/BrowserProvider protocol and implements a specific network browser type.
- `access`: The doc://com.apple.devicediscoveryui/documentation/DeviceDiscoveryUI/DDDevicePairingAccess access level. The default is DDDevicePairingAccess.default.
- `onSelect`: A closure that the framework calls when someone selects a device in the picker view, or cancels the view.
- `label`: A label the network device picker displays.
- `fallback`: A view that the framework displays if the current device doesn’t support device discovery.
- `parameters`: Parameters for your network connection. Use doc://com.apple.documentation/documentation/Network/NWParameters/applicationService to create a default set of parameters that create an encrypted connection with the other devices. You can also add a doc://com.apple.documentation/documentation/Network/NWProtocolFramer to provide an application-level messaging protocol.

## See Also

### Creating a device picker

- [init(_:onSelect:label:fallback:parameters:)](devicediscoveryui/devicepicker/init(_:onselect:label:fallback:parameters:).md)
