title: Watch for value change in macOS user defaults?
body: <p>Is it possible to access the system's user defaults values from an app?
  Is there a way to watch for changes to a user default?</p>
  
  <hr>
  
  <p>For example, let's say I want to know when the dock's autohide option changes.</p>
  
  <p>From the command line I could poll <code>defaults read com.apple.dock autohide</code>, or maybe I could watch the <code>~/Library/Preferences/com.apple.dock.plist</code> file for changes.</p>
  
  <p>But can this be done from an app? Is there an API for this?</p>