Mac OS Sonoma SSID Info missing even though app has location service

Hello Experts,

After updating to Mac OS sonoma, I am not able to get SSID info and going through already issue, I can see that on update location access is mandatory to get SSID info from API - scanForNetworksWithName:includeHidden:error:

Now my application is already able to get latitude and longitude info, but when I call API mentioned above, it gives nil in ssid name field.

Questions -

  • Is there any known issue?
  • Is there any other better way to get CWNetwork object so that I can use it directly instead of scanning and then connecting?

Note - I have created app package, but application has no GUI. Application is also combination of Golang and Objective-C

Just to add more info, currently if I try to connect with nil ssid object with the help of associateToEnterpriseNetwork:identity:username:password:error: it crashes with

2024-01-08 12:00:35.291 osx-core-location[35472:7987323] 
Object choosen: <CWNetwork: 0x600001f40000> [ssid=(null), bssid=(null), security=(null), rssi=-24, channel=<CWChannel: 0x600001f40180> [channelNumber=116(5GHz), channelWidth={80MHz}], ibss=0]
SIGILL: illegal instruction
PC=0x7ff80be65610 m=0 sigcode=1
signal arrived during cgo execution

application has no GUI.

In Apple parlance an application is something you double click in the Finder, thus it always has a GUI. So, I’d like to clarify what you mean by this. How is your program started?

currently if I try to connect with nil ssid object with the help of associateToEnterpriseNetwork:identity:username:password:error: it crashes

Yep. That API needs to kno which network to connect to, so passing in nil will not work.

Share and Enjoy

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

@eskimo Thanks for the response. I am also able to get Latitude/Longitude info, then why SSID info is getting hidden if OS doesn't like my agent then it should not give me location info as well?

Is there anyway my application will be treated on par as GUI application even though it does not have any GUI app?

Currently I am using ~/Library/LaunchAgents with below plist

<plist version="1.0">
    <dict>
        <key>StandardOutPath</key>
        <string>/tmp/app.log</string>
        <key>StandardErrorPath</key>
        <string>/tmp/app.log</string>
        <key>Label</key>
        <string>test.osx</string>
        <key>ProgramArguments</key>
        <array>
            <string>/Users/test/Desktop/Location.app/Contents/MacOS/osx-core-location</string>
        </array>
        <key>KeepAlive</key>
        <true/>
        <key>RunAtLoad</key>
        <true/>
    </dict>
</plist>

Currently I am using ~/Library/LaunchAgents with below plist

OK, so you’re running as a launchd agent in a GUI login session. That should be able to get location permission and hence access SSID info.

/Users/test/Desktop/Location.app/Contents/MacOS/osx-core-location`

Is that the main executable of this Location app? What’s in the CFBundleExecutable property within the bundle’s Contents/Info.plist?

Share and Enjoy

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

Here is the content of Info.plist

Just to add more info SSID and BSSID info both are null.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>CFBundleExecutable</key>
        <string>osx-core-location</string>
        <key>CFBundleIconFile</key>
        <string>icon.icns</string>
        <key>CFBundleIdentifier</key>
        <string>com.osx-core-location.tk</string>
        <key>NSHighResolutionCapable</key>
        <true/>
        <key>NSLocationAlwaysUsageDescription</key>
        <string>For WiFi access</string>
        <key>NSLocationWhenInUseUsageDescription</key>
        <string>For WiFi access</string>
</dict>
</plist>

Hmmm, weird.

If you disable your agent and instead run /Users/test/Desktop/Location.app/Contents/MacOS/osx-core-location directly from Terminal, do you have the same problem?

Share and Enjoy

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

Ohh, after spending so much time, I can say below things.

SSID Info - After requesting location, it always gives null on first call to get ssid info but then subsequent calls return SSID info as expected. BSSID Info - BSSID info remains null during all the calls

@eskimo Do you think I should file a BUG for this BSSID info case also for SSID info case?

After requesting location, it always gives null on first call to get ssid info but then subsequent calls return SSID info as expected.

Is that true if you quit and relaunch? So, what do you see with this sequence:

  1. Launch.

  2. Request location.

  3. Quit.

  4. Get SSID.

Share and Enjoy

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

Mac OS Sonoma SSID Info missing even though app has location service
 
 
Q