I am writing an application that makes use of Uniform Type Identifiers. Specifically, I am calling UTTypeCreateAllIdentifiersForTag() and passing it various MIME types.
My hope was that this function (as distinct from UTTypeCreatePreferredIdentifierForTag()) would give me the most specific UTI as well as all the UTIs to which it conforms. This appears not to be the case -- it either returns a single UTI, or the secondary UTIs are spurious.
There is the UTTypeConformsTo() function defined in the same header file, but I'd prefer a function that returns an array of all the types to which this UTI conforms.
There appears to be hope for me, as MDItemCopyAttributeList() will return such a list. That said, it requires an MDItemRef, which can be created from either a file path or URL -- which isn't great. Sometimes my data is only stored in-memory and I only have a MIME type to go by.
Do I have to iterate through the entire database of UTIs to get this information or am I missing something?