Contents

wifiAware(_:)

Configure Wi-Fi Aware properties on an NWParameters object.

Declaration

final func wifiAware(_ configurator: (inout WAParameters) -> Void) -> Self

Parameters

  • configurator:

    The function that will apply the desired WAParameters to the network parameters.

Return Value

The updated parameters, with the configured Wi-Fi Aware parameters applied.

Discussion

If not previously set, parameters will have WAParameters/defaults applied initially.

Example:

// Create NWParameters & apply wifiAware parameters
let networkParameters = NWParameters().wifiAware {
	$0 = .defaults
}