MacOS - SSID attribute is Nil on Sonoma OS version

Hi Team,

I have been recently working on MacOS native application which interactes with Native API's to fetch SSID but recently this below mentioned API is returning nil as response on Sonoma OS Version.

Below is the Objective - C for code reference

CWWiFiClient *client = [CWWiFiClient sharedWiFiClient];
CWInterface *interface = [client interface];
NSString *ssid = [interface ssid];

I'm referring to following API - https://developer.apple.com/documentation/corewlan/cwwificlient?language=objc

And trying to retrieve ssid https://developer.apple.com/documentation/corewlan/cwinterface?language=objc

Note : The API is working on MacOS 13.0+ version and this seems to have broken in 14.0+ version

Could you please provide us more details on the API issue, or any alternatives that can be followed, because from the documentation the above code seems to be a valid operation and nothing that is deprecated or restricted.

Replies

SSID attribute is Nil on Sonoma OS version

See this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for response @eskimo , My application is a Non-GUI application. Do you have work around for a Non GUI application how this can be figured out.

Do you have work around for a Non GUI application

Can you be more specific about what you mean by this? Is the code running as a daemon? Or in a GUI context but it just doesn’t present any UI?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

The code runs as a demon in the background

The code runs as a demon in the background

How is your daemon started? By launchd due a launchd property list in /Library/LaunchDaemons? Or something else?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Yes do have a launchd Plist file which is used by the application.

Yes do have a launchd Plist file which is used by the application.

How is it used? Do you copy it to /Library/LaunchDaemons?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I believe there is an issue with macOS Sonoma getting WIFI information @eskimo @SomaSuryaSanjay . When I run the daemon directly and the app shows up in the foreground, the launch agent successfully prompts and access to the resource is granted afterwards. But once launchd manages it as a launch agent, the behavior is inconsistent. Once, I saw it was able to fetch the data. Next, it wasn't able to. Very confusing and I am about to file a bug report to apple.