-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't grant location permissions on MacOs 14 (Sonoma) #50
Comments
I see the same issue on 13.5.1. |
Same issue on 13.5.2. |
This issue persists on 14.1.1 unfortunately - cannot get location. |
Same issue on 14.1.2 |
same issue on macOS Sonoma 14.2.1 |
Trying to compile source code didn't change anything. EDIT : Impossible for me to replace the /var/db/locationd/clients.plist file (operation not permited even through a sudo su shell) Anyway I found a workaround using applescripting: Implement core CLLocationManager module, ask for location rights, querry the location of the device once () and compile the script to an app with File > Export. |
Could you please provide me with the AppleScript? |
Sorry for the delayed response, You need to export it with the App format, then launch it a first time as an app, and allow it to access your location. Note that it outputs your coordinates through an error that you can filter using regex.
|
I tried your script approach, and the best I can get after reviewing all your instructions is "Denied" This seems like a major issue for Apple developers... is it even possible to get the Location from a CLI? Does there need to be a application server setup to accept and run in the background the only way to access the Location API now? |
Make sure you set keys Authorized, Whitelisted for /usr/local/Caskroom/corelocationcli/4.0.2/CoreLocationCLI record. With this danger in mind I finally made it work on my Sonoma 14.3.1, service isn't listed in location services though 🤔 |
Instead of hacking, I am suggesting that my users install this command-line accessible tool: |
Hi. And how do you set up location with your tool? My understanding it is just for quering various types of info from location API, but not for setting location. |
@PTac-h This script works great and taught me some things about AppleScript but I'm stuck on actually getting the location output in a useful format. When I run that in the Script Editor I get the coordinates, and when I run the .app directly from Finder I can authorize the app and see that it works. I can run My current janky workaround is to just write the lat/lng to a file and read that..but that's non-ideal. How are you able to read the output directly from the packaged .app? |
Also experiencing this issue. Is this app still being maintained? |
Resigned and reuploaded https://github.com/Homebrew/homebrew-cask/pull/192209/files |
Thanks for this @fulldecent. Unfortunately updating to |
Workaround (Ventura, Intel): as before, I've used Platypus to create an app bundle from It's basically what locatinator seems to do: for working location services, you need an app around the command line tool to use the latter, with the app being either signed & notarized, if you want to distribute it, or at least signed locally with a dev or ad-hoc signature. |
Maybe there is there a way to get this into Homebrew too, while linking so the command line is still in the right spot |
If the Homebrew caskroom allows for a post-install script, you could distribute the app as an unsigned bundle, then (after installation) ad-hoc sign the app, link the command line tool into the relevant bin directory, and launch the app once to register it with the system, so the user can enable (reenable) it in Location Services. It might also be possible to put the CoreLocationCLI into the app's Resources folder as an autonomous file, and use the app itself only to deliver a prompt for the users to notify them that they need to enable Location Services for the app and its embedded command line tool. (This could be done with a simple shell script using |
Thank you, super helpful. @JayBrown did you see this documented elsewhere (upstream?) |
I just upgraded to MacOs Sonoma 14.0 Beta (23A5286i). I've been running corelocationCli for many years, and usually when I upgrade OSs I have to reinstall it using Brew. However this time was different.
At first it actually worked just fine for a day. Then it stopped working, and I was getting "The operation couldn’t be completed. (kCLErrorDomain error 0.)" despite wifi being on.
In an attempt to fix the issue, I did my usual of running 'brew reinstall --cask corelocationcli' (so I have the latest version as of 7/18/2023)
Now I'm getting "Location services are disabled or location access denied. Please visit System Preferences > Security & Privacy > Privacy > Location Services"
However, Location services are on. But also, CoreLocationCLI is no longer in the list of things I can enable.
Thanks!
The text was updated successfully, but these errors were encountered: