<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WiFiAware",
  "identifier" : "/documentation/WiFiAware/WAPairedDevice/allDevices(matching:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Wi-Fi Aware"
    ],
    "preciseIdentifier" : "s:9WiFiAware14WAPairedDeviceV10allDevices8matchingAC0G8SequenceV10Foundation9PredicateVyAC_QPG_tFZ"
  },
  "title" : "allDevices(matching:)"
}
-->

# allDevices(matching:)

Provides a snapshot of all the paired devices known to your app.

```
static func allDevices(matching: Predicate<WAPairedDevice>) -> WAPairedDevice.DevicesSequence
```

## Parameters

`matching`

The predicate that filters the devices. The system only provides updates for devices matching this predicate.

## Return Value

A new [`WAPairedDevice.DevicesSequence`](/documentation/WiFiAware/WAPairedDevice/DevicesSequence) that returns [`WAPairedDevice.Devices`](/documentation/WiFiAware/WAPairedDevice/Devices) elements holding a snapshot of the currently paired devices known to your app.

## Discussion

This method gets an `AsyncSequence` that provides snapshots of all [`WAPairedDevice.Devices`](/documentation/WiFiAware/WAPairedDevice/Devices) currently paired and known to your app
that match the provided predicate, and provides updates when the snapshot of [`WAPairedDevice.Devices`](/documentation/WiFiAware/WAPairedDevice/Devices) matching that predicate changes.
The sequence outputs an empty dictionary if there are no paired devices matching the
predicate that are known to your app, or if a person removes all of your app’s matching paired devices.

You can select the set of `Devices` matching a filter from this property using the code below:

```swift
let filter = #Predicate<WAPairedDevice> { $0.pairingInfo?.vendorName.starts(with: "Example Inc") ?? false }

// Get a snapshot of all paired devices at the current moment.
guard let devices = try await WAPairedDevice.allDevices(matching:filter).current() { return }

// Get a snapshot of all paired devices at the current moment, and get a new snapshot each time a device is added, changed, or removed.
for try await devices in WAPairedDevice.allDevices(matching:filter) {
	// Process update.
}
```

---

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)