fulldecent / corelocationcli

Command line program to print location information from CoreLocation
MIT License
217 stars 29 forks source link

Unable to reset location services prompt after denying #15

Closed greglarkin closed 7 years ago

greglarkin commented 7 years ago

This may not be a problem with CoreLocationCLI, but I wondered if anyone has an idea about what I'm seeing and how to fix it.

I used CoreLocationCLI once during testing, and when I saw the prompt to allow/deny access to location services, I accidentally pressed "deny". Now I can't get the application to prompt again, and there's no entry for CoreLocationCLI in the Security & Privacy->Location Services panel in System Preferences. If there was, I could probably reset it there.

I've tried turning off global location services and reenabling them, but that hasn't helped. Do you have any idea how I can get the program to re-prompt for access to location services?

In case it helps, here is the verbose output from the program:

$ CoreLocationCLI -verbose YES 2017-03-29 16:32:15.969 CoreLocationCLI[5179:11162095] authorizationStatus: 2 2017-03-29 16:32:15.969 CoreLocationCLI[5179:11162095] locationServicesEnabled: 1 2017-03-29 16:32:15.970 CoreLocationCLI[5179:11162095] significantLocationChangeMonitoringAvailable: 0 2017-03-29 16:32:15.970 CoreLocationCLI[5179:11162095] headingAvailable: 0 2017-03-29 16:32:15.970 CoreLocationCLI[5179:11162095] regionMonitoringAvailable: 1 ERROR: The operation couldn’t be completed. (kCLErrorDomain error 1.)

This is on Mac OS X 10.11.6

fulldecent commented 7 years ago

Could you please send a screenshot of your PRIVACY tab.

screen shot 2017-04-03 at 9 29 28 pm

Is it possible that there is an option for CoreLocationCLI but that you need to scroll to see it?

greglarkin commented 7 years ago

I thought that, too, but I scrolled through and it isn't there. This only shows the top half of the list, of course:

image

The rest:

image

fulldecent commented 7 years ago

Just made a big change. And now this is released on Homebrew. Could you please try reinstalling and confirm if it makes a difference?

greglarkin commented 7 years ago

Hi @fulldecent, I installed the new version of CoreLocationCLI, and this time when it prompted me for access to location services, I confirmed it. I now see an entry in the list above. I'm not sure what it would have done if I had denied access again.

I also noticed that there's a new feature where if global location services are disabled, CoreLocationCLI will exit after a short timeout. That's excellent, because we were trying to work around that situation causing a hang in our application, and now we don't have to. Thank you for the update!

fulldecent commented 7 years ago

Excellent, thank you for the update. Yes, new features keep coming in!

Should we close this issue and reopen if anyone else sees it again?

greglarkin commented 7 years ago

Yes, please go ahead, and thanks again.

One other question - it doesn't appear that the code in the repository has changed for a number of months. Is the code for the latest version of the application stored somewhere else now?

fulldecent commented 7 years ago

The big change is the packaging. Now you can install using homebrew, if you have that.