| Framework | /System/Library/Frameworks/MobileCoreServices.framework |
| Companion guide | |
| Declared in | UTCoreTypes.h UTType.h |
Uniform Type Identifiers (or UTIs) are strings which uniquely identify abstract types. They can be used to describe a file format or an in-memory data type, but can also be used to describe the type of other sorts of entities, such as directories, volumes, or packages.
Type declarations appear in bundle property lists and tell the system several things about a type. Detailed information about the format and declaration of a UTI can be found in Uniform Type Identifiers Overview. A few key concepts that are found in the declaration include:
Conformance. Conformance relationships establish a multiple inheritance hierarchy between types. Type property values may be inherited at runtime according to the conformance relationships for each type. When a type's declaration does not include a value for particular type property, then the type's supertypes are searched for a value. Supertypes are searched depth-first, in the order given in the type declaration. This is the only way in which the declared order of the supertypes is significant.
Tags. A tag is a string which indicates the definition of the type in some other type identification mechanism, such as a filename extension or MIME type. The namespace of the other type identification mechanism is known as its class. Classes are themselves identified by uniform type identifiers so that the set of valid tag classes is easily extended in the future.
Type declarations may include several other properties: a localizable user description of the type, the name of an icon resource in the declaring bundle, a reference URL identifying technical documentation about the type itself, and a version number, which can be incremented as a type evolves. All of these properties are optional.
Encodes an OSType into a string suitable for use as a tag argument.
CFStringRef UTCreateStringForOSType(OSType inOSType);
The OSType to convert.
A string that encodes the OSType.
The UTI functions assume that all alternate identifier tags can be represented as Core Foundation strings. OSTypes are integer-based rather than string-based, so to pass an OSType into a UTI function, you must call this function to convert it to a string.
UTType.hDecodes a tag string into an OSType.
OSType UTGetOSTypeFromString(CFStringRef inString);
A string that encodes an OSType.
The OSType that was encoded in the string.
You call this function to convert an OSType string returned by a UTI function back into the integer-based OSType.
UTType.hReturns whether a uniform type identifier conforms to another uniform type identifier.
Boolean UTTypeConformsTo( CFStringRef inUTI, CFStringRef inConformsToUTI);
A uniform type identifier to compare.
The uniform type identifier to compare it to.
Returns true if the uniform type identifier is equal to or conforms to the second type.
UTType.hReturns a uniform type’s declaration.
CFDictionaryRef UTTypeCopyDeclaration(CFStringRef inUTI);
A uniform type identifier.
A dictionary that contains the uniform type’s declaration, or NULL if no declaration for that type can be found.
A uniform type identifier is declared in a bundle’s information property list (info.plist). This function extracts and returns a dictionary that contains the complete declaration of the uniform type identifier. This is useful when your application needs to access properties that does not have a built-in accessor function. For more information on the dictionary format, see Uniform Type Identifiers Overview.
UTType.hReturns the location of a bundle containing the declaration for a type.
CFURLRef UTTypeCopyDeclaringBundleURL(CFStringRef inUTI);
A uniform type identifier.
A URL that points to the bundle that holds the uniform type identifier’s declaration, or NULL if a bundle that holds the declaration cannot be located.
UTType.hReturns the localized, user-readable type description string associated with a uniform type identifier.
CFStringRef UTTypeCopyDescription(CFStringRef inUTI);
A uniform type identifier.
A localized string describing the type, or NULL if no type description is available.
The localized string that describes the uniform type is found in the type’s declaration.
UTType.hTranslates a uniform type identifier to a list of tags in a different type classification method.
CFStringRef UTTypeCopyPreferredTagWithClass( CFStringRef inUTI, CFStringRef inTagClass);
The uniform type identifier to convert.
The class of the tags you want to return. For more information, see “Type Tag Classes”.
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.
UTType.hCreates an array of all uniform type identifiers for the type indicated by the specified tag.
CFArrayRef UTTypeCreateAllIdentifiersForTag( CFStringRef inTagClass, CFStringRef inTag, CFStringRef inConformingToUTI);
The class of the inTag parameter. For more information, see “Type Tag Classes”.
The tag to translate into a uniform type identifier.
If not nil, all returned uniform type identifiers must conform to this parameter.
An array of uniform type identifiers, or NULL if inTagClass is not a known tag class
This function is used to translate a type declared using another declaration mechanism (for example, MIME types) into a uniform type identifier. This function searches all UTI declarations for a matching translation and returns all possible results. If a conforming parameter is assigned, the search is reduced to the subset of type identifiers that conform to that type.
If no result is found, this function creates a dynamic type beginning with the dyn prefix.
UTType.hCreates a uniform type identifier for the type indicated by the specified tag.
CFStringRef UTTypeCreatePreferredIdentifierForTag( CFStringRef inTagClass, CFStringRef inTag, CFStringRef inConformingToUTI);
The class of the inTag parameter. For more information, see “Type Tag Classes”.
The tag to translate into a uniform type identifier.
If not NULL, the returned uniform type identifier must conform to this parameter.
A new CFStringRef containing a uniform type identifier, or NULL if inTagClass is not a known tag class
This function is used to translate a type declared using another declaration mechanism (for example, MIME types) into a uniform type identifier. This function searches all UTI declarations for a matching translation. If a conforming parameter is assigned, the search is reduced to the subset of type identifiers that conform to that type.
If there is more than one possible UTI for the specified tag, the UTI that will be returned is undefined. See UTTypeCreateAllIdentifiersForTag if you need to see all search results.
If no result is found, this function creates a dynamic type beginning with the dyn prefix. This allows you to pass the UTI around and convert it back to the original tag.
UTType.hReturns whether two uniform type identifiers are equal.
Boolean UTTypeEqual( CFStringRef inUTI1, CFStringRef inUTI2);
A uniform type identifier.
The uniform type identifier to compare it to.
Returns true if the two uniform type identifiers are equivalent.
If one or both of the identifiers is a dynamic identifier, then the types are equal if either identifier's tag specification is a subset of the other identifier's tag specification.
UTType.hThese are keys for values found in a UTI dictionary. For more information about UTI dictionaries, see Uniform Type Identifiers Overview.
const CFStringRef kUTExportedTypeDeclarationsKey; const CFStringRef kUTImportedTypeDeclarationsKey; const CFStringRef kUTTypeIdentifierKey; const CFStringRef kUTTypeTagSpecificationKey; const CFStringRef kUTTypeConformsToKey; const CFStringRef kUTTypeDescriptionKey; const CFStringRef kUTTypeIconFileKey; const CFStringRef kUTTypeReferenceURLKey; const CFStringRef kUTTypeVersionKey;
kUTExportedTypeDeclarationsKeyAn array of exported UTI declarations.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTImportedTypeDeclarationsKeyAn array of imported UTI declarations.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTypeIdentifierKeyThe uniform type identifier for the declared type. This key is required.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTypeTagSpecificationKeyA dictionary containing conversions of the uniform type identifier to equivalent tags in other classification schemes. See “Type Tag Classes” for examples.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTypeConformsToKeyThe UTIs to which this identifier conforms.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTypeDescriptionKeyA user-visible description of this type (may be localized).
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTypeIconFileKeyThe name of the bundle icon resource to associate with this UTI.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTypeReferenceURLKeyThe URL of a reference document describing this type.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTypeVersionKeyA version string.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
These strings identify other tagging classification schemes that a uniform type identifier can be converted to and from.
const CFStringRef kUTTagClassFilenameExtension; const CFStringRef kUTTagClassMIMEType; const CFStringRef kUTTagClassNSPboardType; const CFStringRef kUTTagClassOSType;
kUTTagClassFilenameExtensionIndicates that the tag is a filename extension.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTagClassMIMETypeIndicates that the tag is a MIME type.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTagClassNSPboardTypeIndicates that the tag is an NSPasteBoard type.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
kUTTagClassOSTypeIndicates that the tag is an OSType.
Available in Mac OS X v10.3 and later.
Declared in UTType.h.
These are abstract uniform type identifiers that most other type identifiers are derived from.
const CFStringRef kUTTypeItem; const CFStringRef kUTTypeContent; const CFStringRef kUTTypeCompositeContent; const CFStringRef kUTTypeApplication; const CFStringRef kUTTypeMessage; const CFStringRef kUTTypeContact; const CFStringRef kUTTypeArchive; const CFStringRef kUTTypeDiskImage;
kUTTypeItemThe generic base type identifier for most things (files, directories).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeContentThe base type identifier for anything containing user-viewable document content (documents, pasteboard data, and document packages).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeCompositeContentThe base type identifier for content formats supporting mixed embedded content (i.e., compound documents).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeApplicationThe base type identifier for Mac OS X applications.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeMessageThe base type identifier for messages (email, instant message, etc.).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeContactThe base type identifier for contact information( for example, a person, group, or organization).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeArchiveThe base type identifier for an archive of files and directories.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeDiskImageThe base type identifier for a data item mountable as a volume.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
These are uniform type identifiers for concrete types.
const CFStringRef kUTTypeData; const CFStringRef kUTTypeDirectory; const CFStringRef kUTTypeResolvable; const CFStringRef kUTTypeSymLink; const CFStringRef kUTTypeMountPoint; const CFStringRef kUTTypeAliasFile; const CFStringRef kUTTypeAliasRecord; const CFStringRef kUTTypeURL; const CFStringRef kUTTypeFileURL;
kUTTypeDataThe base type identifier for any sort of simple byte stream, including files and in-memory data.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeDirectoryThe base type identifier for a file system directory, including packages and folders.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeResolvableThe base type identifier for symbolic links and alias files.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeSymLinkThe base type identifier for a symbolic link.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeMountPointThe base type identifier for a root directory of a volume.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeAliasFileThe base type identifier for a fully-formed alias file.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeAliasRecordThe base type identifier for raw alias data.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeURLThe base type identifier for the bytes of a URL.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeFileURLThe base type identifier for he text of a "file:" URL.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
These are the uniform type identifiers for text content.
const CFStringRef kUTTypeText; const CFStringRef kUTTypePlainText; const CFStringRef kUTTypeUTF8PlainText; const CFStringRef kUTTypeUTF16ExternalPlainText; const CFStringRef kUTTypeUTF16PlainText; const CFStringRef kUTTypeRTF; const CFStringRef kUTTypeHTML; const CFStringRef kUTTypeXML; const CFStringRef kUTTypeSourceCode; const CFStringRef kUTTypeCSource; const CFStringRef kUTTypeObjectiveCSource; const CFStringRef kUTTypeCPlusPlusSource; const CFStringRef kUTTypeObjectiveCPlusPlusSource; const CFStringRef kUTTypeCHeader; const CFStringRef kUTTypeCPlusPlusHeader; const CFStringRef kUTTypeJavaSource;
kUTTypeTextThe base type identifier for all text-encoded data, including text with markup (HTML, RTF, etc.).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypePlainTextThe base type identifier for text with no markup and in an unspecified encoding.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeUTF8PlainTextThe base type identifier for plain text in a UTF-8 encoding.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeUTF16ExternalPlainTextThe base type identifier for plain text in a UTF-16 encoding. If the encoded text does not include a byte order mark (BOM), the data has "external representation" byte order (big-endian).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeUTF16PlainTextThe base type identifier for plain text in a UTF-16 encoding in native byte order. The byte order mark (BOM) is optional. Correspondes to the 'utxt' OSType.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeRTFThe base type identifier for Rich Text Format.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeHTMLThe base type identifier for HTML, any version.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeXMLThe base type identifier for XML data.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeSourceCodeThe abstract type identifier for source code (any language).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeCSourceThe base type identifier for C source code (.c).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeObjectiveCSourceThe base type identifier for Objective-C source code (.m).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeCPlusPlusSourceThe base type identifier for C++ source code (.cp, etc.).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeObjectiveCPlusPlusSourceThe base type identifier for Objective-C++ source code.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeCHeaderThe base type identifier for a C header.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeCPlusPlusHeaderThe base type identifier for a C++ header.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeJavaSourceThe base type identifier for Java source code.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
Uniform type identifiers for content that includes multiple data types.
const CFStringRef kUTTypePDF; const CFStringRef kUTTypeRTFD; const CFStringRef kUTTypeFlatRTFD; const CFStringRef kUTTypeTXNTextAndMultimediaData; const CFStringRef kUTTypeWebArchive;
kUTTypePDFThe base type identifier for Adobe PDF format.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeRTFDThe base type identifier for Rich Text Format Directory (RTF with content embedding, on-disk format).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeFlatRTFDThe base type identifier for Flattened RTFD (pasteboard format).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeTXNTextAndMultimediaDataThe base type identifier for MLTE (Textension) format for mixed text and multimedia data. Corresponds to the 'txtn' OSType.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeWebArchiveThe base type identifier for the WebKit web archive format
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
Uniform type identifiers for graphics content.
const CFStringRef kUTTypeImage; const CFStringRef kUTTypeJPEG; const CFStringRef kUTTypeJPEG2000; const CFStringRef kUTTypeTIFF; const CFStringRef kUTTypePICT; const CFStringRef kUTTypeGIF; const CFStringRef kUTTypePNG; const CFStringRef kUTTypeQuickTimeImage; const CFStringRef kUTTypeAppleICNS const CFStringRef kUTTypeBMP; const CFStringRef kUTTypeICO;
kUTTypeImageThe abstract type identifier for image data.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeJPEGThe base type identifier for a JPEG image.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeJPEG2000The base type identifier for a JPEG-2000 image.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeTIFFThe base type identifier for a TIFF image.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypePICTThe base type identifier for a Quickdraw PICT.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeGIFThe base type identifier for a GIF image.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypePNGThe base type identifier for a PNG image.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeQuickTimeImageThe base type identifier for a QuickTime image. Corresponds to the 'qtif' OSType.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeAppleICNSThe base type identifier for Apple icon data.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeBMPThe base type identifier for a Windows bitmap.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeICOThe base type identifier for Windows icon data.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
Uniform type identifier for audio and video content.
const CFStringRef kUTTypeAudiovisualContent; const CFStringRef kUTTypeMovie; const CFStringRef kUTTypeVideo; const CFStringRef kUTTypeAudio; const CFStringRef kUTTypeQuickTimeMovie; const CFStringRef kUTTypeMPEG; const CFStringRef kUTTypeMPEG4; const CFStringRef kUTTypeMP3; const CFStringRef kUTTypeMPEG4Audio; const CFStringRef kUTTypeAppleProtectedMPEG4Audio;
kUTTypeAudiovisualContentAn abstract type identifier for audio and/or video content.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeMovieThe type identifier for a media format which may contain both video and audio. Corresponds to what users would label a "movie"
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeVideoThe base type identifier for pure video data(no audio).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeAudioThe base type identifier for pure audio data (no video).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeQuickTimeMovieThe base type identifier for a QuickTime movie.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeMPEGThe base type identifier for a MPEG-1 or MPEG-2 movie.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeMPEG4The base type identifier for a MPEG-4 movie.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeMP3The base type identifier for MP3 audio.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeMPEG4AudioThe base type identifier for a MPEG-4 audio layer.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeAppleProtectedMPEG4AudioThe base type identifier for Apple protected MPEG4 format (.m4p, iTunes music store format).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
Uniform type identifiers for different directory types.
const CFStringRef kUTTypeFolder; const CFStringRef kUTTypeVolume; const CFStringRef kUTTypePackage; const CFStringRef kUTTypeBundle; const CFStringRef kUTTypeFramework;
kUTTypeFolderThe base type identifier for a a user-browsable directory (i.e., not a package).
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeVolumeThe base type identifier for the root folder of a volume/mount point.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypePackageThe base type identifier for a packaged directory.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeBundleThe base type identifier for a directory conforming to a CFBundle layout.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeFrameworkThe base type identifier for directory conforming to a Mac OS X framework.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
Uniform type identifiers for application types.
const CFStringRef kUTTypeApplicationBundle; const CFStringRef kUTTypeApplicationFile;
kUTTypeApplicationBundleThe type identifier for a bundled application.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
kUTTypeApplicationFileThe type identifier for a single-file Carbon/Classic application.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
Uniform type identifiers for contact types.
const CFStringRef kUTTypeVCard;
kUTTypeVCardThe type identifier for VCard format.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
Uniform type identifiers for types that do not fit in other categories.
const CFStringRef kUTTypeInkText;
kUTTypeInkTextThe type identifier for Opaque InkText data.
Available in Mac OS X v10.4 and later.
Declared in UTCoreTypes.h.
Last updated: 2009-09-09