A wrapper around the entire Wi-Fi subsystem that you use to access interfaces and set up event notifications.


class CWWiFiClient : NSObject


Wi-Fi client objects are heavy. Therefore, it's more efficient to use a single, long-running client instance, rather than creating several short-lived instances. For convenience, you can use the singleton instance returned by the shared() class method.

Instead of instantiating CWInterface objects directly, use the ones provided by the instance methods of this class. For example, the interface() method returns the default Wi-Fi interface.


Getting the Shared Instance

class func shared() -> CWWiFiClient

The shared Wi-Fi client object.

Initializing a Wi-Fi Client


Initializes a Wi-Fi client object.

Setting a Delegate

var delegate: AnyObject?

An object that provides Wi-Fi event handling.

Getting Interfaces

func interface() -> CWInterface?

Returns the default Wi-Fi interface.

func interface(withName: String?) -> CWInterface?

Returns the Wi-Fi interface with the given name.

func interfaces() -> [CWInterface]?

Returns all available Wi-Fi interfaces.

class func interfaceNames() -> [String]?

Returns the list of the names of available Wi-Fi interfaces.

Monitoring Events

func startMonitoringEvent(with: CWEventType)

Register for specific Wi-Fi event notifications.

func stopMonitoringAllEvents()

Unregister for all Wi-Fi event notifications.

func stopMonitoringEvent(with: CWEventType)

Unregister for specific Wi-Fi event notifications.


Inherits From

Conforms To