Posts

Post not yet marked as solved
3 Replies
1.5k Views
This is specific for MacOS 10.15 betaIt is known (however, not described well in the documentation) that CoreWLAN scans require location services to be enabled since 10.14. Beta of 10.15 enforces this even further, requiring explicit application location authorization. But scans stil has nil BSSID even with location authorization granted in case if the application is a command line one.Steps to reproduce:- Create a *command line* application in Xcode- Create a location manager and request authorization- Make sure location services are enabled and authorization is granted- Wait for a core location authorization status kCLAuthorizationStatusAuthorizedAlways- After that, issue CoreWLAN networks scan with scanForNetworksWithSSID:nil error:&err]As a result, you will get a scan result, but all BSSIDs will be nil. Just like when there is no location enabled or no auth. Same setup in Cocoa application produces a good scan with populated BSSIDsWith additional experimenting it was found, that it may be related to a workaround that "locationd" service uses to store authorization status for non-bundled binaries. Specifically, locationd stores auth status in /var/db/locationd/clients.plist. And while usual app bundles are referenced there using their bundle id, for command line tools, bundle id is generated presumably by locationd, using a path to a binary, for example: “com.apple.locationd.executable-/Users/noco/testbinary”. And for CoreWLAN, when it checks location auth, it seems to be not using that trick with generated bundle id, and without real bundle id from Info.plist it is unable to auth scan requests even when CoreLocation/locationd are authorised to pass location to command line binary.I filed an issue via Feedback Assistant regarding this, but its status did not change since that. Anyone else is affected by this issue? Any workarounds, or other thoughts?Thanks in advance!
Posted
by poconoco.
Last updated
.