Contents

wifiAware(_:active:)

Setup a NetworkBrowser to subscribe to Wi-Fi Aware services on selected, paired devices.

Declaration

static func wifiAware(_ action: WASubscriberBrowser.Action, active requestedDuration: Duration? = nil) -> Self

Parameters

  • action:

    The specific Wi-Fi Aware operation to perform, and the service & devices to perform it on.

  • requestedDuration:

    Optional duration requested to keep the NetworkBrowser subscribing. The default value of nil instructs the system to stay active for long enough to guarantee the action completes with all nearby target devices.

Return Value

A new BrowserProvider containing the .wifiAware() instruction that will configure a NetworkBrowser as a Wi-Fi Aware subscriber.

Discussion

Example:

NetworkBrowser(for: .wifiAware(.connecting(to:.selected(devices), from:service)) )