Hello!
Is it possible to add location permissions to a macOS system extension?
We have a network firewall system extension that also considers WIFI connections in its rules. With the release of Sonoma, interface information is only accessible while having location permissions, which we are having trouble asking for.
We have the entitlements, the usage description, but the authorizationStatus
of CLLocationManager
stays at .notDetermined
and no window for location permission pops up after calling requestAlwaysAuthorization()
.
What we need is to get the SSID of the network that the interface is connected, its security and encryption type. If the permission is not possible, is there a workaround?
Cheers
I talked with DTS’s Core Location expert about your problem. The Core WLAN side of this is straightforward: See the Apple Recommended post on this thread. So this boils down to a Core Location issue: Is it possible for a system extension to get the Core Location privilege?
My understand is that it is not. A sysex is effectively a launchd
daemon and daemons can’t get the Core Location privilege.
The only workaround I can suggest is to install a global launchd
agent to do this work on the daemon’s behalf. This is less than ideal:
-
It makes everything more complicated.
-
The modern way to install agents,
SMAppService
, does not support globallaunchd
agents. See this thread. -
Each instance of the agent is ‘owned’ by the user associated with that login session, and thus the user could potentially interfere with its operation.
If you’d like to see this improve, I encourage you to file an enhancement request explaining your requirements and why this is causing you such grief. Make sure to file this against Core Location, because this is an issue that affects all parts of the system where Core Location is involved.
Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"