How to identify whether the location services is enabled or not in MAC OS X

Thanks @rustymyers !

This will get you the location of that file using relevance: ( only available as ROOT )

files whose(name of it as lowercase starts with "com.apple.locationd." AND name of it as lowercase ends with ".plist") of folders "/private/var/db/locationd/Library/Preferences/ByHost"

On my particular system, there are actually 2 files here, which is a bit odd.

  • com.apple.locationd.UUID.plist
  • com.apple.locationd.notbackedup.UUID.plist

The state of location services should be able to be queried through relevance now that I have the location.

This is what the XML representation looks like on my computer:

<plist version="1.0">
<dict>
	<key>LastSystemVersion</key>
	<string>Mac OS X10.11.3/15D21</string>
	<key>LocationServicesEnabled</key>
	<integer>1</integer>
	<key>ObsoleteDataDeleted</key>
	<true/>
</dict>
</plist>

The relevance should be something like this:

integers "LocationServicesEnabled" of dictionaries of files whose(name of it as lowercase starts with "com.apple.locationd." AND name of it as lowercase ends with ".plist") of folders "/private/var/db/locationd/Library/Preferences/ByHost"

I always forget about that.

1 Like