The general question: when I don’t own a particular file format, but no UTI has been defined for it by someone else, how do I use that file format?
The specific situation: I’m creating a QuickLook plugin for .torrent and .nzb files. (Note: .nzb files are similar to .torrent files, except instead of pointing to a bittorrent tracker, they point to a Usenet server.) I want the plugin to display what data the .nzb/.torrent file points to, what files would be downloaded if they were opened, and any other applicable metadata. To do this, I have to set forth the Uniform Type Identifiers for these two filetypes. While .torrent files have a designated UTI of com.bittorrent.torrent, .nzb files do not – the NZB format is defined by newzbin.com, which doesn’t publish its own application (and therefore doesn’t define a Mac OS X Uniform Type Identifier for me to use).
The options seem to be:
- Export and use a UTI in the form of com.example.nzb, where example.com is owned by me. This seems wrong, because I don’t own the nzb format.
- Export and use a UTI in the form of com.newzbin.nzb, where newzbin.com is not owned by me. This seems wrong, because I don’t own newzbin.com.
- Do as e.g. Unison (a Mac OS X application) does and ignore UTI entirely, and use
CFBundleTypeExtensionsin myInfo.plistfile. This seems wrong too, because not only isCFBundleTypeExtensionsdeprecated per Apple’s documentation, but I don’t think I can mix use ofCFBundleTypeExtensionsandLSBundleContentTypes(ifLSBundleContentTypesis present, as it must be for me to use the com.bittorrent.torrent UTI, thenCFBundleTypeExtensionsis ignored).
What’s the right thing to do in this situation?
Try using the
mdlscommand line utility to find a .nzb file’s UTI.For example performing

mdlson this QuickTime movie clearly shows its UTI, boxed in red below.