Associates to a given network using the given network passphrase.
- macOS 10.7+
- Core WLAN
The network to which the interface will associate.
The network passphrase or key. Required for association to WEP, WPA Personal, and WPA2 Personal networks.
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.
A Boolean value which will indicate whether or not a failure occurred during execution. YES indicates no error occurred.
This method will block for the duration of the association. This operation may require an administrator password.