I am trying to enable Location Services for an individual app such as Weather.app etc via command line for High Sierra and Mojave macOS computers.

enter image description here

I was able to enable Location Services at the top level by using these two commands.

For High Sierra:

sudo -u _locationd defaults -currentHost write com.apple.locationd LocationServicesEnabled -int 1

For Mojave:

sudo defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -int 1

However, I haven't figured out how to enable Location Services for an individual app yet and hope the community here can help me figure out. :)

  • which apps do you have in mind – Ruskes Dec 4 '18 at 7:45
  • @Buscar웃 For now, two apps stood out for me: Safari and Location Helper – Mac Dec 4 '18 at 14:32
  • I do not understand, if you preselect which apps are allowed (on the right), then just use your command to turn location on or off – Ruskes Dec 4 '18 at 17:27
  • @Buscar웃 Let me clarify about my office's Mac environment. We are using Mobile device management (MDM) solution such as JAMF to manage the Macs. The main issue was: when we deploy the app, the user will get a prompt on whether to allow it to use Location Services data. If the user does not allow it, the app will be not getting Location Services data even if Location Services is enabled. (At our environment, everyone is an admin on their computers. Yikes!) My command does turn on at the Location services in general but it does not do it for a specific app. – Mac Dec 5 '18 at 0:25

You should Click The Lock to Make Changes..enter your root passcode. Then you will see all the features (including apps) unlock & ready to accept changes. Klick to the app you’re interested to.

  • 1
    The question is about how to do this from the command line, not the UI – nohillside Dec 5 '18 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .