15.1 requestAlwaysAuthorization is no effect in WifiAccess.app

After upgrading to 15.1, SSIDs can no longer be scanned. In my main application, there is a wifiAccess.app in the LaunchService folder that is killed by embbed. This app is the root process that is placed under launchDaemon and loaded by launchd

CLLocationManager *locationManager = [[CLLocationManager alloc] init];
if (@available(macOS 10.15, *)) {
[locationManager requestAlwaysAuthorization];
} else {
// erlier version do not need localtion permission
}

NSError *error;
NSData *ssidStrData = [ssid dataUsingEncoding:NSUTF8StringEncoding];
CWInterface *interface = [[CWWiFiClient sharedWiFiClient] interface];
NSSet<CWNetwork *> *networks = [interface scanForNetworksWithSSID:ssidStrData error:nil];

However, the obtained networks do not have ssid.

{(<CWNetwork: 0x600000368680> [ssid=(null), bssid=(null), security=WPA2 Enterprise, rssi=-49, channel=<CWChannel:  0x600000370bd0> [channelNumber=44(5GHz), channelWidth={20MHz}], ibss=0],
<CWNetwork: 0x600000370b30> [ssid=(null), bssid=(null), security=WPA2 Enterprise, rssi=-73, channel=<CWChannel:  0x600000370b00> [channelNumber=6(2GHz), channelWidth={20MHz}], ibss=0],
<CWNetwork: 0x600000370be0> [ssid=(null), bssid=(null), security=WPA2 Enterprise, rssi=-44, channel=<CWChannel:  0x600000370c60> [channelNumber=165(5GHz), channelWidth={20MHz}], ibss=0]
},

the main program has granted the location permission, but the location authorization has not responded in this wifiaccess process. And

(lldb) po [locationManager authorizationStatus]
kCLAuthorizationStatusNotDetermined. 

The output authorization is always unauthorized, but only the authorization option of the main application can be seen in the system Settings location permissions setting, wifiaccess.app is not present on the list

How do I solve this problem NSSet<CWNetwork *> *networks = [interface scanForNetworksWithSSID:ssidStrData error:nil]; I want to get the ssid normally. According to the description of the CoreWlan top post. I also added the location permission. It works fine in the main program, but the subroutine that plist runs with launchd in LaunchDaemon doesn't. Someone can help me

After upgrading to 15.1

Upgrading from which release? macOS 15.0? Or some version of macOS 14?

Share and Enjoy

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

15.1 requestAlwaysAuthorization is no effect in WifiAccess.app
 
 
Q