One Logo Pool Ball
WiFiAware · IOS API REFERENCE

WAPairedDevice.DevicesSequence

struct · iOS 26.0+ · SDK 27.1

struct DevicesSequence

A sequence that vends updates to a paired device list, as the list changes. The `DevicesSequence` produces an asynchronous sequence of ``WAPairedDevice/Devices`` items, providing the latest snapshot of the paired devices known to your app.

Members (2)

method · iOS 26.0+

makeAsyncIterator

TypeScript
makeAsyncIterator(): WAPairedDevice_DevicesSequence_AsyncIterator
Swift declaration
func makeAsyncIterator() -> WAPairedDevice.DevicesSequence.AsyncIterator

Makes an asynchronous iterator that provides successive device snapshots when the list of paired devices known to the app changes. - Returns: A new asynchronous iterator vending ``WAPairedDevice/Devices`` elements when changes occur.

method · iOS 26.0+

current

TypeScript
current(): Promise<(Record<number, WAPairedDevice>) | null>
Swift declaration
func current() async throws -> WAPairedDevice.DevicesSequence.Element?

Fetches a one-time snapshot of all paired devices that are currently known and accessible to your app. The ``WAPairedDevice/Devices`` dictionary holds a snapshot of the currently paired devices that are known and accessible to your app. This method returns an empty dictionary if there are no paired devices known to your app. The following code is an example of how to use `current()` to return the first `Devices` snapshot in the sequence: ```swift guard let devices = try await WAPairedDevice.allDevices.current() { return } ``` Don't use this method if you need to monitor for changes to the paired device list, or change app behavior in response to such changes. Instead, use ```swift for try await devices in WAPairedDevice.allDevices { // Process the devices. } ``` - Returns: A single ``WAPairedDevice/Devices`` element holding a snapshot of the currently paired devices known to the app, or `nil` if the sequence has no more values. > Throws: An error if the system can't read the sequence, or if the app isn't permitted to access Wi-Fi Aware devices. - seeAlso: ``WAPairedDevice/allDevices`` - seeAlso: ``WAPairedDevice/allDevices(matching:)``

Skipped declarations

No declarations were skipped in this snapshot.

All WiFiAware types →