UTIs and Launch Services
Where is the list of “known” file types stored?
The official term for "file types" is
Uniform Type Identifiers
(UTIs), and the database of UTIs is maintained by
Using the Terminal,
you can view the contents of the Launch Services database using the
lsregister tool, which is stored at:
Instead of specifying that long path every time you want to run
lsregister, you can temporarily add its directory to your
and then you can run
lsregister by simply entering:
To view the contents of the Launch Services database:
Declaring New UTIs
Is there a way to make OS X recognize new file types?
This Apple article,
"Declaring New Uniform Type Identifiers",
provides useful information on how to do this. Here's the complete process:
1. Create a dummy application
Create a dummy application to register with Launch Services:
- Open AppleScript Editor (located in OS X's Utilities folder).
- Save a new empty script somewhere (eg: on your Desktop), setting its File Format to Application.
2. Open its Info.plist file
- Locate your new dummy application in the Finder.
- Right-click on it, and select Show Package Contents from the popup menu.
- Open its Contents folder.
- Open the Info.plist file in a text editor (eg: TextEdit).
3. Add your new UTI
There's a choice of two keys:
UTExportedTypeDeclarations – for your own custom filename extensions.
UTImportedTypeDeclarations – for filename extensions which already exist but aren't recognised by OS X.
Choose the key which is most appropriate for your needs.
Then in the Info.plist file, before the final two lines (
</dict></plist>), add this code:
making the following changes:
KEY with your chosen key (either
IDENTIFIER with a suitable reverse-DNS identifier:
- Exported – Something like
- Imported – For id Software's
Doom WAD format, a suitable identifier would be
EXTENSION with the filename extension (without the leading dot), eg:
This is the minimum code necessary for Launch Services to accept your new UTI.
You can also add the following optional properties:
UTTypeConformsTo – See the Appendix below.
UTTypeDescription – A user-visible description, which will be displayed in the Finder.
UTTypeIconFile – If you add an Apple Icon Image
file to the Contents/Resources folder in your dummy application, and add its filename in this property,
then files which have your new filename extension will use this icon.
UTTypeReferenceURL – The URL of a reference document describing this type.
Here's a complete example showing all the optional properties:
<string>Doom WAD file</string>
4. Register your new UTI with Launch Services
Run this command in the Terminal:
<PATH_TO_APP> with the path to your dummy application, eg:
If you now create a file with your new filename extension, and then select it in the Finder
and hit Enter, the Finder should automatically select only the filename part, not the extension.
If you view the contents of the Launch Services database:
you should find your new UTI listed:
type id: 50364
description: Doom WAD file
flags: imported active apple-internal untrusted
conforms to: public.data
If you later want to unregister your new UTI, pass the
-u option to
lsregister -u ~/Desktop/MyDummyApp.app
Appendix: UTI hierarchy and conformance
OS X declares a hierarchy of UTIs which are listed here:
System-Declared Uniform Type Identifiers.
Here are a few UTIs in the hierarchy:
Each UTI "conforms to" its parent UTI:
For example, the UTI
public.html, which defines HTML text, conforms to the
base text identifier,
public.text. In this case, conformance lets applications
that can open general text files identify HTML files as ones it can open as well.
When creating a new UTI, it's a good idea to set the
UTTypeConformsTo property to one
of the existing UTIs.
For example, if your new UTI is a type of source code,
then you should set the
UTTypeConformsTo property to
so that it can be opened by any applications which can open