title: UTI's and File Extension associations
body: <p>In my application, I wanted to include a QuickLook plugin that reads a non-system extension other applications also use (let's use RAR for this example). I declare the extension as an <code>Exported UTI</code> in my app bundle's Info.plist like so:</p>
  
  <pre><code>&lt;key&gt;UTExportedTypeDeclarations&lt;/key&gt;
  &lt;array&gt;
      &lt;dict&gt;
          &lt;key&gt;UTTypeConformsTo&lt;/key&gt;
          &lt;array&gt;
              &lt;string&gt;public.data&lt;/string&gt;
              &lt;string&gt;public.archive&lt;/string&gt;
              &lt;string&gt;com.rarlab.rar-archive&lt;/string&gt;
          &lt;/array&gt;
          &lt;key&gt;UTTypeDescription&lt;/key&gt;
          &lt;string&gt;Custom RAR Archive&lt;/string&gt;
          &lt;key&gt;UTTypeIdentifier&lt;/key&gt;
          &lt;string&gt;com.my-company.rarx-archive&lt;/string&gt;
          &lt;key&gt;UTTypeTagSpecification&lt;/key&gt;
          &lt;dict&gt;
              &lt;key&gt;public.filename-extension&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;rarx&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
      &lt;/dict&gt;
  &lt;/array&gt;
  </code></pre>
  
  <p>And I also appropriately import the RAR UTI:</p>
  
  <pre><code>&lt;key&gt;UTImportedTypeDeclarations&lt;/key&gt;
  &lt;array&gt;
      &lt;dict&gt;
          &lt;key&gt;UTTypeConformsTo&lt;/key&gt;
          &lt;array&gt;
              &lt;string&gt;public.data&lt;/string&gt;
              &lt;string&gt;public.archive&lt;/string&gt;
          &lt;/array&gt;
          &lt;key&gt;UTTypeDescription&lt;/key&gt;
          &lt;string&gt;RAR Archive&lt;/string&gt;
          &lt;key&gt;UTTypeIconFile&lt;/key&gt;
          &lt;string&gt;RAR&lt;/string&gt;
          &lt;key&gt;UTTypeIdentifier&lt;/key&gt;
          &lt;string&gt;com.rarlab.rar-archive&lt;/string&gt;
          &lt;key&gt;UTTypeTagSpecification&lt;/key&gt;
          &lt;dict&gt;
              &lt;key&gt;public.filename-extension&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;rar&lt;/string&gt;
                  &lt;string&gt;rarx&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
      &lt;/dict&gt;
  &lt;/array&gt;
  </code></pre>
  
  <p>The RARX files never seem to get associated with my app after I run it, though. To check the association, I used <code>mdls</code> like so:</p>
  
  <pre><code>mdls -name kMDItemContentTypeTree "/Users/Me/.../A File.rarx"
  &gt;&gt;&gt; kMDItemContentTypeTree = (
      "com.another-company.rarx-archive",
      "public.data",
      "public.item",
      "public.archive"
  )
  </code></pre>
  
  <p>Why isn't my UTI (<code>com.my-company.rarx-archive</code>) showing up in that list? I believe this is resulting in my Quick Look plugin not firing, as the files are associated with the <code>com.another-company.rarx-archive</code> UTI. The other app on my system is what gets used instead. Running <code>qlmanage</code> with debugging output bears this out.</p>