title: How does macOS locate applications by bundle identifier?
body: <p><code>absolutePathForAppBundleWithIdentifier</code> and <code>URLForApplicationWithBundleIdentifier</code> are API calls that take in a bundle identifier and return the path to the application that's declared that identifier. How does this work?</p>
  <ul>
  <li>Is there a cache?
  <ul>
  <li>Where is it located?</li>
  <li>What format is it in?</li>
  <li>What updates this cache?</li>
  <li>Can I query this cache directly from the command line?</li>
  </ul>
  </li>
  <li>What happens if there's multiple bundles with same identifier, such as multiple versions of the same app or two apps that have an id collision?</li>
  </ul>