---
title: endpoint
framework: devicediscoveryui
role: symbol
role_heading: Instance Property
path: devicediscoveryui/dddevicepickerviewcontroller/endpoint
---

# endpoint

A network connection endpoint for the device that a person selected.

## Declaration

```swift
@MainActor @preconcurrency var endpoint: NWEndpoint { get async throws }
```

## Discussion

Discussion Your app can asynchronously read from this property. The system populates this property when someone selects a device from the endpoint picker. If someone cancels the picker, the system throws an error. let endpoint: NWEndpoint do {     endpoint = try await myEndpointPickerHandler.endpoint } catch {     // Someone canceled the endpoint picker view.     return }

// Use the endpoint here. myDeviceConnectionManager.connectTo(endpoint: endpoint)
