<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WiFiAware",
  "identifier" : "/documentation/WiFiAware/WAPublisherListener/Devices",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Wi-Fi Aware"
    ],
    "preciseIdentifier" : "s:9WiFiAware19WAPublisherListenerV7DevicesV"
  },
  "title" : "WAPublisherListener.Devices"
}
-->

# WAPublisherListener.Devices

The structure that determines the devices to connect to.

```
struct Devices
```

## Overview

This structure determines the devices the `NetworkListener` acts on or allows
connections from when publishing and includes only the devices that are relevant
for a given `NetworkListener` operation and use case. It allows your app to
include only the devices that are relevant for a given `NetworkListener`
operation and use case.

`Devices` is the “`from:`” component of the `.wifiAware()` instruction to a `NetworkListener`.

The code below is an example of configuring a `NetworkListener` with specific devices to allow connections from:

```swift
NetworkListener(for: .wifiAware( .connecting(to:service,  from:.selected(devices)) ) )
```

> Important: Only include the devices your app intends to use with the use case. Including unnecessary devices may impose additional power and performance costs on both the local and remote devices, and may reduce privacy.

## Topics

### Selecting specific devices

[`static func selected(WAPairedDevice.Devices) -> WAPublisherListener.Devices`](/documentation/WiFiAware/WAPublisherListener/Devices/selected(_:)-56vig)

Includes only the preselected paired devices in the provided dictionary.

[`static func selected(some Sequence<WAPairedDevice>) -> WAPublisherListener.Devices`](/documentation/WiFiAware/WAPublisherListener/Devices/selected(_:)-1e2)

Includes only the preselected paired devices in the provided list.

[`static let userSpecifiedDevices: WAPublisherListener.Devices`](/documentation/WiFiAware/WAPublisherListener/Devices/userSpecifiedDevices)

Includes only new devices the user pairs via DeviceDiscoveryUI’s `DevicePairingView()`.

### Using a live matching filter

[`static func matching(Predicate<WAPairedDevice>) -> WAPublisherListener.Devices`](/documentation/WiFiAware/WAPublisherListener/Devices/matching(_:))

Includes only paired devices matching the provided live filter predicate.

### Allowing your paired devices to connect

[`static let allPairedDevices: WAPublisherListener.Devices`](/documentation/WiFiAware/WAPublisherListener/Devices/allPairedDevices)

The property that includes all paired devices that your app has access to.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)