Reputation: 4034
I am building an app in Xcode that uses Core Location. On first run the app asks the user for permission. I want to revoke this permission to trigger the flow anew.
I cannot find my app in the list of apps under Settings / Location Services.
Upvotes: 2
Views: 1817
Reputation: 1
Remove Application from Location Services in Security & Privacy by right clicking on the app entry and go to the app folder. Move the app to trash bin. Close Security & Privacy.
Terminal command:
Restart Mac. (Important as to make sure Location Services is not using what's in the memory. Force OS to read from clients.plist again)
P.S.: There is no need to change the ownership back to you or convert the plist file back to binary format. It will be reset to default ownership or format very soon by the OS.
Upvotes: 0
Reputation: 7646
It's odd that your app isn't in Security & Privacy->Location Services. I don't have an answer to that.
If you do uncheck the permission in that pane, though, you won't start the flow anew. Instead you'll be simulating a rejection of permission (user denied the permission request).
The tccutil
command line program ought to be able to manipulate those settings. But I tried tccutil reset All
on my machine and it didn't affect Location privacy.
It looks like the property list at /var/db/locationd/clients.plist has the authorized applications. So you might be able to edit that file with the plutil
command line tool to remove your application. Or just make a copy, edit with Xcode to remove your application, and swap in that copy for testing.
sudo bash
plutil -p /var/db/locationd/clients.plist
Upvotes: 0