Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QuickLook Plugin: how does it work when 2 plugins handle the same file type?

If a user has 2 or more quicklook plugins that handle the same kMDItemContentType what happens? Which plugin gets priority to do that actual work? Can that be set programmatically?

like image 603
regulus6633 Avatar asked Aug 28 '10 10:08

regulus6633


People also ask

Where are QuickLook plugins stored?

QuickLook plugins are installed to ~/Library/QuickLook . You can run xattr -d -r com. apple. quarantine ~/Library/QuickLook to remove the com.

What is qlgenerator?

A QLGENERATOR file is a plug-in for Apple's Quick Look tool in macOS. It enables various types of files to be viewed directly in the Finder using Quick Look. Examples of Quick Look plug-ins include: Audio. qlgenerator.

How do I install QuickLook Plugin?

To install QuickLook plugins, you should copy the “*. qlgenerator” file into /Library/QuickLook/ or ~/Library/QuickLook/. Note that “*” in the filename will vary based on exactly which QuickLook item you choose to install. If a QuickLook folder is not present, feel free to create one.


1 Answers

From a quick reading of the docs (Installing Quick Look Generators), the Quick Look daemon chooses a generator based on the following search order:

  1. Inside the app bundle: MyApp.app/Content/Library/QuickLook
  2. In ~/Library/QuickLook
  3. In /Library/QuickLook
  4. In /System/Library/QuickLook

They finish by saying that if there is more than one generator for a UTI, the one that ranks highest on that list is chosen. If there are two or more for the same UTI at the same level, Apple says there is no way to know which will be chosen; the generator that is found first in their search is used.

like image 148
Ryan Q Avatar answered Sep 26 '22 03:09

Ryan Q