<!--
{
  "availability" : [
    "tvOS: 16.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceDiscoveryUI",
  "identifier" : "/documentation/DeviceDiscoveryUI/DevicePicker/init(_:onSelect:label:fallback:parameters:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "DeviceDiscoveryUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:024_DeviceDiscoveryUI_SwiftC00A6PickerV_8onSelect5label8fallback10parametersACyxq_G7Network9NWBrowserC10DescriptorO_yAI10NWEndpointOcxyXEq_yXEAI12NWParametersCycSgtcfc"
  },
  "title" : "init(_:onSelect:label:fallback:parameters:)"
}
-->

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

Creates a view that displays available devices.

```
@MainActor @preconcurrency init(_ browseDescriptor: NWBrowser.Descriptor, onSelect: @escaping (NWEndpoint) -> Void, @ViewBuilder label: () -> Label, @ViewBuilder fallback: () -> Fallback, parameters: (() -> NWParameters)? = nil)
```

## Parameters

`browseDescriptor`

A descriptor for your application service. To create an application service descriptor, call `NWBrowser.Descriptor.applicationService(name:options:)` and provide a name for the service.

`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.

---

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)