I am trying to get BSSID of current WiFi connection on Mac OS X 10.14 but get nil
.
The code returning nil
is the following:
NSString *bssid = [[[CWWiFiClient sharedWiFiClient] interface] bssid];
though SSID returns valid value:
NSString *ssid = [[[CWWiFiClient sharedWiFiClient] interface] ssid];
Other solutions works for iOS, e.g. using CaptiveNetworks framework proposed here How do I get the current access point's MAC address/BSSID?, but some methods, like CNCopyCurrentNetworkInfo
- not supported for MacOS.