The Uniform Type Identifier — UTI for short — is an interesting means to map files to the type of data they contain. macOS uses UTIs to work out what kinds of file an application can open to view or edit. My Preview… apps rely on UTIs to indicate their interest in certain file types. The system uses that information to pass files to my application extensions when a user previews a file using QuickLook. Generally, they’re hidden from users.

There’s a flaw in the system, however. A UTI might indicate the content a file might be expected to contain, but how does the system connect a file to a UTI? By using its file extension. But while UTIs are unique, file extensions are not, and this is where the trouble begins.
Continue reading
