MacOS 10.15(beta) - BssId is Nil in CWNetwork (CoreWLAN)

I am using CoreWLAN to get a list of wifi networks available to a Macbook. 'scanForNetworksWithName' returns a list of 'CWNetwork' which contains ssid, bssid, signal strength etc. On MacOS 10.15 (beta 3), the bssid is Nil while the ssid and signal strength have valid values. The exact same code works fine on Mac OS 10.14.5. I have added the 'location' entitlement and also codesigned and notarized the application. Any solutions to this problem?

Replies

Hi Everyone,


Does anyone have any solutions to this problem or know about this problem?

+1 on this.


Anyone has an idea?

The API doesn't mention this being deprecated either - https://developer.apple.com/documentation/corewlan/cwnetwork/1512224-bssid?language=objc

+1.


While upgraded to 10.15 GM Seed, I can't get bssid through CWNetwork either.

Are there any other solutions to get bssid, rssi and etc about Wi-Fis nearby?

Since MacOS 10.14, CoreWLAN scans require location setting to be on, and 10.15 Beta requires also explicit location authorizarion to be granted for the app (just like when requesting a location) to receive BSSID information in the scan result. Because BSSIDs can be easily used to get user location.


But there is also a bug when BSSIDs are stil nils even with location autorization granted in case of command line application. I've filed a feedback via Feedback Assistant, and posted a question here, for the reference: https://forums.developer.apple.com/message/387784#387784

Seems like the issue still persists on macOS Big Sur 11.1

Using location request
Code Block
CLLocationManager().requestAlwaysAuthorization()


Now, about the CoreWLAN...

Code Block
CWWiFiClient.shared().interface(withName: nil)?.ssid() ?? ""

returns actual current network name.

Code Block
CWWiFiClient.shared().interface(withName: nil)?.rssiValue() ?? 0

also returns the correct RSSI strength value. However...


Code Block
CWWiFiClient.shared().interface(withName: nil)?.bssid() ?? ""

returns nothing.