Translates a uniform type identifier to a list of tags in a different type classification method.


func UTTypeCopyPreferredTagWithClass(_ inUTI: CFString, _ inTagClass: CFString) -> Unmanaged<CFString>?



The uniform type identifier to convert.


The class of the tags you want to return. For more information, see Type Tag Classes.

Return Value

An array of tags (as CFStrings), or NULL if there was no translation available to convert the uniform type identifier to the specified class.


If the type declaration included more than one tag with the specified class, the first tag in the declared tag array is the preferred tag.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software