Optionalinterface: string | nullthe interface name as returned by interfaces(); omit for the system's default Wi-Fi interface
a table with keys interface, active, power, ssid, bssid, security, interfaceMode, activePHYMode, rssi, noise, transmitRate, transmitPower, countryCode, hardwareAddress, wlanChannel, supportedChannels; or null if the interface doesn't exist. ssid/bssid/countryCode/wlanChannel may be absent without Location Services authorization.
Returns detailed information about a Wi-Fi interface. This is safe to call frequently. The interface's cached scan results and its configuration are available from
cachedScanResults()andconfiguration(), which are kept separate because fetching them can leak memory inside macOS.activereports whether the interface is in use, and does not need Location Services authorization, so it's a way to check that Wi-Fi is connected without that permission.