Instance Method

scanForNetworks(withName:)

Scans for networks.

Declaration

func scanForNetworks(withName networkName: String?) throws -> Set<CWNetwork>

Parameters

networkName

The name (SSID) of the network for which to scan.

error

An NSError object passed by reference, which will be populated with the error code and the error description if an error occurs during the execution of this method. This parameter is optional and can be passed as nil.

Return Value

A set of CWNetwork objects.

Discussion

If ssid parameter is present, a directed scan will be performed by the interface, otherwise a broadcast scan will be performed. This method will block for the duration of the scan.

See Also

Scanning for networks