I've had a little personal utility running for several versions of macOS that uses
let client = CWWiFiClient.shared()
if let ssid_name = client.interface()?.ssid()
to get the current SSID name and prints it (along with a bunch of other active network details.
With the most recent Sonoma Beta 2 and Xcode beta 2, this always returns nil.
Doing the same thing in a playground works as expected.
Is this a purposeful change or a bug I should file?
I asked the CoreWLAN folks about this, and it looks like this was a deliberate change: Accessing the ssid
property now requires the location privilege (r. 108641482).
We called this out in the header doc comments, where <CoreWLAN/CWInterface.h>
now says:
SSID information is not available unless Location Services is enabled and the user has authorized the calling app to use location services.
I’d appreciate you filing a bug requested that the official docs be updated with that info.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"