One Logo Pool Ball
UniformTypeIdentifiers · IOS API REFERENCE

UTType

struct · iOS 14.0+ · SDK 27.1

struct UTType

A structure representing a type in a type hierarchy. Types may represent files on disk, abstract data types with no on-disk representation, or even entirely unrelated hierarchical classification systems such as hardware. Older API that does not use `UTType` typically uses an untyped `String` or `CFString` to refer to a type by its identifier. To get the identifier of a type for use with these APIs, use the `identifier` property of this type. - SeeAlso: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/

Members (165)

init · iOS 14.0+

init

TypeScript
static initMimeTypeConformingTo(mimeType: string, supertype?: UTType): (UTType) | null
Swift declaration
init?(mimeType: String, conformingTo supertype: UTType = .data)

Create a type given a MIME type. - Parameters: - mimeType: The MIME type for which a type is desired. - supertype: Another type that the resulting type must conform to. Typically, you would pass `.data`. - Returns: A type. If no types are known to the system with the specified MIME type and conformance but the inputs were otherwise valid, a dynamic type may be provided. If the inputs were not valid, returns `nil`. This method is equivalent to: ``` UTType(tag: mimeType, tagClass: .mimeType, conformingTo: supertype) ```

get · iOS 14.0+

cPlusPlusHeader

TypeScript
static get cPlusPlusHeader(): UTType
Swift declaration
static var cPlusPlusHeader: UTType { get }

A C++ header. **UTI:** public.c-plus-plus-header **conforms to:** public.source-code

get · iOS 14.0+

cPlusPlusSource

TypeScript
static get cPlusPlusSource(): UTType
Swift declaration
static var cPlusPlusSource: UTType { get }

C++ source code (.cp, etc.) **UTI:** public.c-plus-plus-source **conforms to:** public.source-code

get · iOS 14.0+

executable

TypeScript
static get executable(): UTType
Swift declaration
static var executable: UTType { get }

An executable item. **UTI:** public.executable **conforms to:** public.item

init · iOS 14.0+

init

TypeScript
static initExportedAsConformingTo(identifier: string, parentType?: (UTType) | null): UTType
Swift declaration
init(exportedAs identifier: String, conformingTo parentType: UTType? = nil)

Gets an active `UTType` corresponding to a type that is declared as "exported" by the current process. - Parameters: - identifier: The type identifier for which a type is desired. - parentType: A parent type that the resulting type is expected to conform to. If `nil`, conformance to either `.data` or `.package` is assumed. - Returns: A type. Use this method to get types that are exported by your application. If `identifier` does not correspond to any type known to the system, the result is undefined. You would generally use this method by assigning its value to a `static let` constant in an extension of `UTType`: ``` extension UTType { static let myFileFormat = UTType(exportedAs: "com.example.myfileformat") } ```

init · iOS 27.0+

init

TypeScript
static initIdentifierAllowUndeclared(identifier: string, allowUndeclared: boolean): (UTType) | null
Swift declaration
init?(identifier: String, allowUndeclared: Bool)

Create a type given a type identifier, optionally allowing identifiers that do not have an active declaration on the current system. When `allowUndeclared` is `true`, this initializer can be used to obtain a type object that keeps the "identity" of the input identifier even if no type with that identifier is (currently) known to the system. In that case, the type is neither dynamic nor declared, and has no conformances or tags (or any other properties). If a type with the input identifier is known to the system, or if the input identifier is in the dynamic namespace, it returns the same type object that `typeWithIdentifier:` would return. If `allowUndeclared` is `false`, this initializer behaves identically to `UTType.init?(:)` given the same identifier. One may use this, for instance, to create a concrete type object using an identifier that may have been obtained from another system, and round-trip it through a subsystem without losing the identity of the type. If the input `identifier` is not a valid Uniform Type Identifier, the initializer returns `nil`. See https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-SW2 - Parameters: - identifier: The type identifier. - allowUndeclared: Whether to return an object if no type with the provided identifier is known to the system. - Returns: A type object, or `nil` if the input `identifier` was not a Uniform Type Identifier.

get · iOS 14.0+

identifier

TypeScript
get identifier(): string
Swift declaration
var identifier: String { get }

The receiver's identifier. A type is _identified by_ its Uniform Type Identifier (UTI), a reverse-DNS string such as `"public.jpeg"` or `"com.adobe.pdf"`. The type itself _has_ a UTI, but is not itself the UTI. This terminology is not consistently used across Apple's documentation. Older API that does not use `UTType` typically uses an untyped `String` or `CFString` to refer to a type by its identifier.

init · iOS 14.0+

init

TypeScript
static initImportedAsConformingTo(identifier: string, parentType?: (UTType) | null): UTType
Swift declaration
init(importedAs identifier: String, conformingTo parentType: UTType? = nil)

Gets an active `UTType` corresponding to a type that is declared as "imported" by the current process. - Parameters: - identifier: The type identifier for which a type is desired. - parentType: A parent type that the resulting type is expected to conform to. If `nil`, conformance to either `.data` or `.package` is assumed. - Returns: A type whose identifier may or may not be equal to `identifier`, but which is functionally equivalent. Use this method to get types that are imported by your application. If `identifier` does not correspond to any type known to the system, the result is undefined. You would generally use this method in the body of a `static` computed property in an extension of `UTType` as the type can change over time: ``` extension UTType { static var competitorFileFormat: UTType { UTType(importedAs: "com.example.competitorfileformat") } } ``` In the general case, this method returns a type with the same identifier, but if that type has a preferred filename extension and _another_ type is the preferred type for that extension, then that _other_ type is substituted.

get · iOS 14.0+

isDeclared

TypeScript
get isDeclared(): boolean
Swift declaration
var isDeclared: Bool { get }

Whether or not the receiver is a type known to the system. A type cannot be both declared _and_ dynamic. You cannot construct an instance of `UTType` that is neither declared nor dynamic.

get · iOS 14.0+

javaScript

TypeScript
static get javaScript(): UTType
Swift declaration
static var javaScript: UTType { get }

JavaScript source code **UTI:** com.netscape.javascript-source **conforms to:** public.source-code, public.executable

get · iOS 14.0+

mountPoint

TypeScript
static get mountPoint(): UTType
Swift declaration
static var mountPoint: UTType { get }

A volume mount point (resolvable, resolves to the root directory of a volume.) **UTI:** com.apple.mount-point **conforms to:** public.item, com.apple.resolvable

get · iOS 14.0+

mpeg2Video

TypeScript
static get mpeg2Video(): UTType
Swift declaration
static var mpeg2Video: UTType { get }

An MPEG-2 video. **UTI:** public.mpeg-2-video **conforms to:** public.video

get · iOS 14.0+

mpeg4Audio

TypeScript
static get mpeg4Audio(): UTType
Swift declaration
static var mpeg4Audio: UTType { get }

An MPEG-4 audio layer file. **UTI:** public.mpeg-4-audio **conforms to:** public.mpeg-4, public.audio

get · iOS 14.0+

mpeg4Movie

TypeScript
static get mpeg4Movie(): UTType
Swift declaration
static var mpeg4Movie: UTType { get }

MPEG-4 movie **UTI:** public.mpeg-4 **conforms to:** public.movie

get · iOS 14.0+

perlScript

TypeScript
static get perlScript(): UTType
Swift declaration
static var perlScript: UTType { get }

A Perl script. **UTI:** public.perl-script **conforms to:** public.shell-script

get · iOS 14.0+

resolvable

TypeScript
static get resolvable(): UTType
Swift declaration
static var resolvable: UTType { get }

Symbolic link and alias file types conform to this type. **UTI:** com.apple.resolvable

get · iOS 14.0+

rubyScript

TypeScript
static get rubyScript(): UTType
Swift declaration
static var rubyScript: UTType { get }

A Ruby script. **UTI:** public.ruby-script **conforms to:** public.shell-script

get · iOS 14.0+

sourceCode

TypeScript
static get sourceCode(): UTType
Swift declaration
static var sourceCode: UTType { get }

Abstract type for source code of any language. **UTI:** public.source-code **conforms to:** public.plain-text

get · iOS 14.0+

supertypes

TypeScript
get supertypes(): Array<UTType>
Swift declaration
var supertypes: Set<UTType> { get }

The set of types to which the receiving type conforms, directly or indirectly. If you are just interested in checking if one type conforms to another, it is more efficient to use `conforms(to:)` than this property.

get · iOS 18.0+

tarArchive

TypeScript
static get tarArchive(): UTType
Swift declaration
static var tarArchive: UTType { get }

A tar Archive. **UTI:** public.tar-archive **conforms to:** public.data, public.archive

get · iOS 14.0+

webArchive

TypeScript
static get webArchive(): UTType
Swift declaration
static var webArchive: UTType { get }

The WebKit webarchive format. **UTI:** com.apple.webarchive **conforms to:** public.data, public.composite-content

get · iOS 14.0+

xpcService

TypeScript
static get xpcService(): UTType
Swift declaration
static var xpcService: UTType { get }

An XPC service bundle. **UTI:** com.apple.xpc-service **conforms to:** com.apple.bundle, com.apple.package

get · iOS 14.0+

appleScript

TypeScript
static get appleScript(): UTType
Swift declaration
static var appleScript: UTType { get }

An AppleScript text-based script (.applescript). **UTI:** com.apple.applescript.text **conforms to:** public.script

get · iOS 14.0+

application

TypeScript
static get application(): UTType
Swift declaration
static var application: UTType { get }

The base type for macOS and iOS applications. **UTI:** com.apple.application **conforms to:** public.executable

get · iOS 14.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

method · iOS 14.0+

isSupertype

TypeScript
isSupertype(type: UTType): boolean
Swift declaration
func isSupertype(of type: UTType) -> Bool

Tests if the receiver is a supertype of another type. - Parameters: - type: The type against which conformance should be tested. - Returns: If `type` conforms, directly or indirectly, to the receiver and is not equal to it, returns `true`. Otherwise, returns `false`. - SeeAlso: conforms(to:) - SeeAlso: isSubtype(of:)

get · iOS 14.0+

m3uPlaylist

TypeScript
static get m3uPlaylist(): UTType
Swift declaration
static var m3uPlaylist: UTType { get }

An M3U or M3U8 playlist **UTI:** public.m3u-playlist **conforms to:** public.text, public.playlist

get · iOS 14.0+

realityFile

TypeScript
static get realityFile(): UTType
Swift declaration
static var realityFile: UTType { get }

A Reality File. **UTI:** com.apple.reality **conforms to:** public.data

get · iOS 14.0+

shellScript

TypeScript
static get shellScript(): UTType
Swift declaration
static var shellScript: UTType { get }

The base type for shell scripts. **UTI:** public.shell-script **conforms to:** public.script

get · iOS 14.0+

spreadsheet

TypeScript
static get spreadsheet(): UTType
Swift declaration
static var spreadsheet: UTType { get }

A base type for spreadsheet documents. **UTI:** public.spreadsheet **conforms to:** public.content

get · iOS 14.0+

swiftSource

TypeScript
static get swiftSource(): UTType
Swift declaration
static var swiftSource: UTType { get }

Swift source code (.swift) **UTI:** public.swift-source **conforms to:** public.source-code

get · iOS 14.0+

appleArchive

TypeScript
static get appleArchive(): UTType
Swift declaration
static var appleArchive: UTType { get }

An Apple Archive. **UTI:** com.apple.archive **conforms to:** public.data, public.archive

get · iOS 14.0+

emailMessage

TypeScript
static get emailMessage(): UTType
Swift declaration
static var emailMessage: UTType { get }

An e-mail message. **UTI:** public.email-message **conforms to:** public.message

get · iOS 14.0+

pluginBundle

TypeScript
static get pluginBundle(): UTType
Swift declaration
static var pluginBundle: UTType { get }

The base type for bundle-based plugins. **UTI:** com.apple.plugin **conforms to:** com.apple.bundle, com.apple.package

get · iOS 14.0+

presentation

TypeScript
static get presentation(): UTType
Swift declaration
static var presentation: UTType { get }

A base type for presentation documents. **UTI:** public.presentation **conforms to:** public.composite-content

get · iOS 14.0+

propertyList

TypeScript
static get propertyList(): UTType
Swift declaration
static var propertyList: UTType { get }

A base type for property lists. **UTI:** com.apple.property-list **conforms to:** public.data

get · iOS 14.0+

pythonScript

TypeScript
static get pythonScript(): UTType
Swift declaration
static var pythonScript: UTType { get }

A Python script. **UTI:** public.python-script **conforms to:** public.shell-script

get · iOS 14.0+

referenceURL

TypeScript
get referenceURL(): (string) | null
Swift declaration
var referenceURL: URL? { get }

The reference URL of the type. A reference URL is a human-readable document describing a type. Most types do not specify reference URLs. - Warning: This URL is not validated in any way by the system, nor is its scheme or structure guaranteed in any way.

get · iOS 14.0+

symbolicLink

TypeScript
static get symbolicLink(): UTType
Swift declaration
static var symbolicLink: UTType { get }

A symbolic link. **UTI:** public.symlink **conforms to:** public.item, com.apple.resolvable

get · iOS 14.0+

calendarEvent

TypeScript
static get calendarEvent(): UTType
Swift declaration
static var calendarEvent: UTType { get }

A calendar event. **UTI:** public.calendar-event

get · iOS 14.0+

delimitedText

TypeScript
static get delimitedText(): UTType
Swift declaration
static var delimitedText: UTType { get }

Text containing delimited values. **UTI:** public.delimited-values-text **conforms to:** public.text

get · iOS 14.0+

sceneKitScene

TypeScript
static get sceneKitScene(): UTType
Swift declaration
static var sceneKitScene: UTType { get }

A SceneKit serialized scene. **UTI:** com.apple.scenekit.scene **conforms to:** public.3d-content, public.data

get · iOS 14.0+

threeDContent

TypeScript
static get threeDContent(): UTType
Swift declaration
static var threeDContent: UTType { get }

A base type for 3D content. **UTI:** public.3d-content **conforms to:** public.content

get · iOS 14.0+

utf8PlainText

TypeScript
static get utf8PlainText(): UTType
Swift declaration
static var utf8PlainText: UTType { get }

Plain text encoded as UTF-8. **UTI:** public.utf8-plain-text **conforms to:** public.plain-text

get · iOS 14.0+

quickTimeMovie

TypeScript
static get quickTimeMovie(): UTType
Swift declaration
static var quickTimeMovie: UTType { get }

A QuickTime movie. **UTI:** com.apple.quicktime-movie **conforms to:** public.movie

get · iOS 14.0+

unixExecutable

TypeScript
static get unixExecutable(): UTType
Swift declaration
static var unixExecutable: UTType { get }

A UNIX executable (flat file.) **UTI:** public.unix-executable **conforms to:** public.data, public.executable

get · iOS 14.0+

utf16PlainText

TypeScript
static get utf16PlainText(): UTType
Swift declaration
static var utf16PlainText: UTType { get }

Plain text encoded as UTF-16, in native byte order, with an optional BOM. **UTI:** public.utf16-plain-text **conforms to:** public.plain-text

get · iOS 14.0+

osaScriptBundle

TypeScript
static get osaScriptBundle(): UTType
Swift declaration
static var osaScriptBundle: UTType { get }

An Open Scripting Architecture script bundle (.scptd). **UTI:** com.apple.applescript.script-bundle **conforms to:** com.apple.bundle, com.apple.package, public.script

get · iOS 14.0+

urlBookmarkData

TypeScript
static get urlBookmarkData(): UTType
Swift declaration
static var urlBookmarkData: UTType { get }

A URL bookmark. **UTI:** com.apple.bookmark **conforms to:** public.data, com.apple.resolvable

get · iOS 14.0+

x509Certificate

TypeScript
static get x509Certificate(): UTType
Swift declaration
static var x509Certificate: UTType { get }

An X.509 certificate. **UTI:** public.x509-certificate **conforms to:** public.data

get · iOS 14.0+

xmlPropertyList

TypeScript
static get xmlPropertyList(): UTType
Swift declaration
static var xmlPropertyList: UTType { get }

An XML property list. **UTI:** com.apple.xml-property-list **conforms to:** public.xml, com.apple.property-list

get · iOS 14.0+

compositeContent

TypeScript
static get compositeContent(): UTType
Swift declaration
static var compositeContent: UTType { get }

A base type for content formats supporting mixed embedded content (i.e., compound documents). **UTI:** public.composite-content **conforms to:** public.content

get · iOS 14.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 14.0+

internetLocation

TypeScript
static get internetLocation(): UTType
Swift declaration
static var internetLocation: UTType { get }

A base type for Apple Internet location files. **UTI:** com.apple.internet-location **conforms to:** public.data

get · iOS 14.0+

internetShortcut

TypeScript
static get internetShortcut(): UTType
Swift declaration
static var internetShortcut: UTType { get }

Microsoft Internet shortcut files (.url). **UTI:** com.apple.internet-location **conforms to:** public.data

get · iOS 14.0+

objectiveCSource

TypeScript
static get objectiveCSource(): UTType
Swift declaration
static var objectiveCSource: UTType { get }

Objective-C source code (.m) **UTI:** public.objective-c-source **conforms to:** public.source-code

get · iOS 14.0+

tabSeparatedText

TypeScript
static get tabSeparatedText(): UTType
Swift declaration
static var tabSeparatedText: UTType { get }

Text containing tab-separated values. **UTI:** public.tab-separated-values-text **conforms to:** public.delimited-values-text

get · iOS 14.0+

applicationBundle

TypeScript
static get applicationBundle(): UTType
Swift declaration
static var applicationBundle: UTType { get }

A bundled application. **UTI:** com.apple.application-bundle **conforms to:** com.apple.application, com.apple.bundle, com.apple.package

get · iOS 14.0+

arReferenceObject

TypeScript
static get arReferenceObject(): UTType
Swift declaration
static var arReferenceObject: UTType { get }

An AR reference object. **UTI:** com.apple.arobject **conforms to:** public.data

init · iOS 14.0+

init

TypeScript
static initFilenameExtensionConformingTo(filenameExtension: string, supertype?: UTType): (UTType) | null
Swift declaration
init?(filenameExtension: String, conformingTo supertype: UTType = .data)

Create a type given a filename extension. - Parameters: - filenameExtension: The filename extension for which a type is desired. - supertype: Another type that the resulting type must conform to. Typically, you would pass `.data` or `.package`. - Returns: A type. If no types are known to the system with the specified filename extension and conformance but the inputs were otherwise valid, a dynamic type may be provided. If the inputs were not valid, returns `nil`. This method is equivalent to: ``` UTType(tag: filenameExtension, tagClass: .filenameExtension, conformingTo: supertype) ``` To get the type of a file on disk, use `URLResourceValues.contentType`. You should not attempt to derive the type of a file system object based solely on its filename extension.

get · iOS 14.0+

preferredMIMEType

TypeScript
get preferredMIMEType(): (string) | null
Swift declaration
var preferredMIMEType: String? { get }

If available, the preferred (first available) tag of class `.mimeType`. If not `nil`, the value of this property is the best available MIME type for the given type, according to its declaration. The value of this property is equivalent to, but more efficient than: ``` type.tags[.mimeType]?.first ```

get · iOS 14.0+

spotlightImporter

TypeScript
static get spotlightImporter(): UTType
Swift declaration
static var spotlightImporter: UTType { get }

A Spotlight metadata importer bundle. **UTI:** com.apple.metadata-importer **conforms to:** com.apple.plugin

get · iOS 14.0+

audiovisualContent

TypeScript
static get audiovisualContent(): UTType
Swift declaration
static var audiovisualContent: UTType { get }

Any audio and/or video content. **UTI:** public.audiovisual-content **conforms to:** public.data, public.content

get · iOS 14.0+

binaryPropertyList

TypeScript
static get binaryPropertyList(): UTType
Swift declaration
static var binaryPropertyList: UTType { get }

A binary property list. **UTI:** com.apple.binary-property-list **conforms to:** com.apple.property-list

get · iOS 14.0+

commaSeparatedText

TypeScript
static get commaSeparatedText(): UTType
Swift declaration
static var commaSeparatedText: UTType { get }

Text containing comma-separated values (.csv). **UTI:** public.comma-separated-values-text **conforms to:** public.delimited-values-text

get · iOS 14.0+

quickLookGenerator

TypeScript
static get quickLookGenerator(): UTType
Swift declaration
static var quickLookGenerator: UTType { get }

A QuickLook preview generator bundle. **UTI:** com.apple.quicklook-generator **conforms to:** com.apple.plugin

get · iOS 14.0+

applicationExtension

TypeScript
static get applicationExtension(): UTType
Swift declaration
static var applicationExtension: UTType { get }

An application extension (.appex). **UTI:** com.apple.application-and-system-extension **conforms to:** com.apple.xpc-service

get · iOS 14.0+

localizedDescription

TypeScript
get localizedDescription(): (string) | null
Swift declaration
var localizedDescription: String? { get }

The localized description of the type. If the type does not provide a description, the system may search its supertypes for one. Dynamic types never have localized descriptions even if their supertypes do.

get · iOS 14.0+

mpeg2TransportStream

TypeScript
static get mpeg2TransportStream(): UTType
Swift declaration
static var mpeg2TransportStream: UTType { get }

The MPEG-2 Transport Stream movie format. **UTI:** public.mpeg-2-transport-stream **conforms to:** public.movie

get · iOS 14.0+

utf8TabSeparatedText

TypeScript
static get utf8TabSeparatedText(): UTType
Swift declaration
static var utf8TabSeparatedText: UTType { get }

UTF-8 encoded text containing tab-separated values. **UTI:** public.utf8-tab-separated-values-text **conforms to:** public.tab-separated-values-text, public.utf8-plain-text

get · iOS 14.0+

systemPreferencesPane

TypeScript
static get systemPreferencesPane(): UTType
Swift declaration
static var systemPreferencesPane: UTType { get }

A System Preferences pane. **UTI:** com.apple.systempreference.prefpane **conforms to:** com.apple.package, com.apple.bundle

get · iOS 14.0+

assemblyLanguageSource

TypeScript
static get assemblyLanguageSource(): UTType
Swift declaration
static var assemblyLanguageSource: UTType { get }

Assembly language source (.s) **UTI:** public.assembly-source **conforms to:** public.source-code

get · iOS 14.0+

utf16ExternalPlainText

TypeScript
static get utf16ExternalPlainText(): UTType
Swift declaration
static var utf16ExternalPlainText: UTType { get }

Plain text encoded as UTF-16 with a BOM, or if a BOM is not present, using "external representation" byte order (big-endian). **UTI:** public.utf16-external-plain-text **conforms to:** public.plain-text

get · iOS 14.0+

appleProtectedMPEG4Audio

TypeScript
static get appleProtectedMPEG4Audio(): UTType
Swift declaration
static var appleProtectedMPEG4Audio: UTType { get }

The Apple protected MPEG4 format (.m4p, iTunes music store format.) **UTI:** com.apple.protected-mpeg-4-audio **conforms to:** public.audio

get · iOS 14.0+

appleProtectedMPEG4Video

TypeScript
static get appleProtectedMPEG4Video(): UTType
Swift declaration
static var appleProtectedMPEG4Video: UTType { get }

An Apple protected MPEG-4 movie. **UTI:** com.apple.protected-mpeg-4-video **conforms to:** com.apple.m4v-video

get · iOS 18.0+

linkPresentationMetadata

TypeScript
static get linkPresentationMetadata(): UTType
Swift declaration
static var linkPresentationMetadata: UTType { get }

Serialized LinkPresentation metadata. **UTI:** com.apple.linkpresentation.metadata **conforms to:** public.data

get · iOS 14.0+

objectiveCPlusPlusSource

TypeScript
static get objectiveCPlusPlusSource(): UTType
Swift declaration
static var objectiveCPlusPlusSource: UTType { get }

Objective-C++ source code. **UTI:** public.objective-c-plus-plus-source **conforms to:** public.source-code

get · iOS 14.0+

preferredFilenameExtension

TypeScript
get preferredFilenameExtension(): (string) | null
Swift declaration
var preferredFilenameExtension: String? { get }

If available, the preferred (first available) tag of class `.filenameExtension`. Many uses of types require the generation of a filename (e.g. when saving a file to disk.) If not `nil`, the value of this property is the best available filename extension for the given type, according to its declaration. The value of this property is equivalent to, but more efficient than: ``` type.tags[.filenameExtension]?.first ```

get · iOS 14.0+

avi

TypeScript
static get avi(): UTType
Swift declaration
static var avi: UTType { get }

The AVI movie format. **UTI:** public.avi **conforms to:** public.movie

get · iOS 14.0+

bmp

TypeScript
static get bmp(): UTType
Swift declaration
static var bmp: UTType { get }

A Windows bitmap. **UTI:** com.microsoft.bmp **conforms to:** public.image

get · iOS 14.0+

bz2

TypeScript
static get bz2(): UTType
Swift declaration
static var bz2: UTType { get }

A bzip2 archive. **UTI:** public.bzip2-archive **conforms to:** public.data, public.archive

get · iOS 18.0+

css

TypeScript
static get css(): UTType
Swift declaration
static var css: UTType { get }

Cascading Style Sheets (CSS) **UTI:** public.css **conforms to:** public.text

get · iOS 18.0+

dng

TypeScript
static get dng(): UTType
Swift declaration
static var dng: UTType { get }

An Adobe DNG (digital negative) image. **UTI:** com.adobe.raw-image **conforms to:** public.image

get · iOS 14.0+

exe

TypeScript
static get exe(): UTType
Swift declaration
static var exe: UTType { get }

A Windows executable (.exe). **UTI:** com.microsoft.windows-executable **conforms to:** public.data, public.executable

get · iOS 18.0+

exr

TypeScript
static get exr(): UTType
Swift declaration
static var exr: UTType { get }

An EXR image. **UTI:** com.ilm.openexr-image **conforms to:** public.image

get · iOS 14.0+

gif

TypeScript
static get gif(): UTType
Swift declaration
static var gif: UTType { get }

A GIF image. **UTI:** com.compuserve.gif **conforms to:** public.image

get · iOS 14.0+

ico

TypeScript
static get ico(): UTType
Swift declaration
static var ico: UTType { get }

Windows icon data **UTI:** com.microsoft.ico **conforms to:** public.image

get · iOS 14.0+

log

TypeScript
static get log(): UTType
Swift declaration
static var log: UTType { get }

A base type for console logs. **UTI:** public.log

get · iOS 14.0+

mp3

TypeScript
static get mp3(): UTType
Swift declaration
static var mp3: UTType { get }

MP3 audio. **UTI:** public.mp3 **conforms to:** public.audio

get · iOS 14.0+

pdf

TypeScript
static get pdf(): UTType
Swift declaration
static var pdf: UTType { get }

An Adobe PDF document. **UTI:** com.adobe.pdf **conforms to:** public.data, public.composite-content

get · iOS 14.0+

png

TypeScript
static get png(): UTType
Swift declaration
static var png: UTType { get }

A PNG image. **UTI:** public.png **conforms to:** public.image

get · iOS 14.0+

rtf

TypeScript
static get rtf(): UTType
Swift declaration
static var rtf: UTType { get }

Rich Text Format data. **UTI:** public.rtf **conforms to:** public.text

get · iOS 14.0+

svg

TypeScript
static get svg(): UTType
Swift declaration
static var svg: UTType { get }

A Scalable Vector Graphics image. **UTI:** public.svg-image **conforms to:** public.image

init · iOS 14.0+

init

TypeScript
static initTagTagClassConformingTo(tag: string, tagClass: UTTagClass, supertype?: (UTType) | null): (UTType) | null
Swift declaration
init?(tag: String, tagClass: UTTagClass, conformingTo supertype: UTType?)

Create a type given a type tag. - Parameters: - tag: The tag, such as a filename extension, for which a type is desired. - tagClass: The class of the tag, such as `.filenameExtension`. - supertype: Another type that the resulting type must conform to. If `nil`, no conformance is required. - Returns: A type. If no types are known to the system with the specified tag but the inputs were otherwise valid, a dynamic type may be provided. If the inputs were not valid, returns `nil`.

get · iOS 14.0+

url

TypeScript
static get url(): UTType
Swift declaration
static var url: UTType { get }

Any URL. **UTI:** public.url **conforms to:** public.data

get · iOS 14.0+

usd

TypeScript
static get usd(): UTType
Swift declaration
static var usd: UTType { get }

Universal Scene Description content. **UTI:** com.pixar.universal-scene-description **conforms to:** public.3d-content, public.data

get · iOS 14.0+

wav

TypeScript
static get wav(): UTType
Swift declaration
static var wav: UTType { get }

The Microsoft waveform audio format (.wav). **UTI:** com.microsoft.waveform-audio **conforms to:** public.audio

get · iOS 14.0+

xml

TypeScript
static get xml(): UTType
Swift declaration
static var xml: UTType { get }

Generic XML. **UTI:** public.xml **conforms to:** public.text

get · iOS 14.0+

zip

TypeScript
static get zip(): UTType
Swift declaration
static var zip: UTType { get }

A zip archive. **UTI:** public.zip-archive **conforms to:** com.pkware.zip-archive

get · iOS 17.0+

ahap

TypeScript
static get ahap(): UTType
Swift declaration
static var ahap: UTType { get }

An Apple Haptics Audio Pattern file. **UTI:** com.apple.haptics.ahap

get · iOS 14.0+

aiff

TypeScript
static get aiff(): UTType
Swift declaration
static var aiff: UTType { get }

The AIFF audio format **UTI:** public.aiff-audio **conforms to:** public.aifc-audio

get · iOS 14.0+

data

TypeScript
static get data(): UTType
Swift declaration
static var data: UTType { get }

A base type for any sort of simple byte stream, including files and in-memory data. **UTI:** public.data **conforms to:** public.item

get · iOS 14.0+

epub

TypeScript
static get epub(): UTType
Swift declaration
static var epub: UTType { get }

The EPUB format. **UTI:** org.idpf.epub-container **conforms to:** public.data, public.composite-content

get · iOS 14.0+

font

TypeScript
static get font(): UTType
Swift declaration
static var font: UTType { get }

A base type for fonts. **UTI:** public.font

get · iOS 14.0+

gzip

TypeScript
static get gzip(): UTType
Swift declaration
static var gzip: UTType { get }

A GNU zip archive. **UTI:** org.gnu.gnu-zip-archive **conforms to:** public.data, public.archive

get · iOS 14.0+

heic

TypeScript
static get heic(): UTType
Swift declaration
static var heic: UTType { get }

A High Efficiency Image Coding image. **UTI:** public.heic **conforms to:** public.heif-standard

get · iOS 14.0+

heif

TypeScript
static get heif(): UTType
Swift declaration
static var heif: UTType { get }

A High Efficiency Image File Format image. **UTI:** public.heif **conforms to:** public.heif-standard

get · iOS 14.0+

html

TypeScript
static get html(): UTType
Swift declaration
static var html: UTType { get }

Any version of HTML. **UTI:** public.html **conforms to:** public.text

get · iOS 14.0+

icns

TypeScript
static get icns(): UTType
Swift declaration
static var icns: UTType { get }

Apple icon data **UTI:** com.apple.icns **conforms to:** public.image

get · iOS 14.0+

item

TypeScript
static get item(): UTType
Swift declaration
static var item: UTType { get }

A generic base type for most things (files, directories.) **UTI:** public.item

get · iOS 14.0+

jpeg

TypeScript
static get jpeg(): UTType
Swift declaration
static var jpeg: UTType { get }

A JPEG image. **UTI:** public.jpeg **conforms to:** public.image

get · iOS 14.0+

json

TypeScript
static get json(): UTType
Swift declaration
static var json: UTType { get }

JavaScript object notation (JSON) data **UTI:** public.json **conforms to:** public.text - Note: JSON almost (but doesn't quite) conforms to com.netscape.javascript-source.

get · iOS 14.0+

midi

TypeScript
static get midi(): UTType
Swift declaration
static var midi: UTType { get }

The MIDI audio format. **UTI:** public.midi-audio **conforms to:** public.audio

get · iOS 14.0+

mpeg

TypeScript
static get mpeg(): UTType
Swift declaration
static var mpeg: UTType { get }

An MPEG-1 or MPEG-2 movie. **UTI:** public.mpeg **conforms to:** public.movie

get · iOS 14.0+

rtfd

TypeScript
static get rtfd(): UTType
Swift declaration
static var rtfd: UTType { get }

A Rich Text Format Directory document (RTF with content embedding in its on-disk format.) **UTI:** com.apple.rtfd **conforms to:** com.apple.package, public.composite-content

get · iOS 14.0+

tags

TypeScript
get tags(): NativeMap<UTTagClass, Array<string>>
Swift declaration
var tags: [UTTagClass : [String]] { get }

The tag specification dictionary of the type. The system does not store tag information for non-standard tag classes. It normalizes string values into arrays containing those strings. For instance, a value of: ``` { "public.mime-type": "x/y", "nonstandard-tag-class": "abc", } ``` Is normalized to: ``` { "public.mime-type": [ "x/y" ] } ``` If you are simply looking for the preferred filename extension or MIME type of a type, it is more efficient for you to use the `preferredFilenameExtension` and `preferredMIMEType` properties respectively.

get · iOS 14.0+

text

TypeScript
static get text(): UTType
Swift declaration
static var text: UTType { get }

The base type for all text-encoded data, including text with markup (HTML, RTF, etc.). **UTI:** public.text **conforms to:** public.data, public.content

get · iOS 14.0+

tiff

TypeScript
static get tiff(): UTType
Swift declaration
static var tiff: UTType { get }

A TIFF image. **UTI:** public.tiff **conforms to:** public.image

get · iOS 14.0+

usdz

TypeScript
static get usdz(): UTType
Swift declaration
static var usdz: UTType { get }

Universal Scene Description Package content. **UTI:** com.pixar.universal-scene-description-mobile **conforms to:** public.3d-content, public.data

get · iOS 14.0+

webP

TypeScript
static get webP(): UTType
Swift declaration
static var webP: UTType { get }

The WebP image format. **UTI:** org.webmproject.webp **conforms to:** public.image

get · iOS 14.0+

yaml

TypeScript
static get yaml(): UTType
Swift declaration
static var yaml: UTType { get }

Yet Another Markup Language. **UTI:** public.yaml **conforms to:** public.text

get · iOS 14.0+

audio

TypeScript
static get audio(): UTType
Swift declaration
static var audio: UTType { get }

Pure audio data with no video data. **UTI:** public.audio **conforms to:** public.audiovisual-content

get · iOS 18.0+

heics

TypeScript
static get heics(): UTType
Swift declaration
static var heics: UTType { get }

A High Efficiency Image Coding Image Sequence. **UTI:** public.heics **conforms to:** public.heif-standard

get · iOS 14.0+

image

TypeScript
static get image(): UTType
Swift declaration
static var image: UTType { get }

A base type for abstract image data. **UTI:** public.image **conforms to:** public.data, public.content

get · iOS 14.0+

movie

TypeScript
static get movie(): UTType
Swift declaration
static var movie: UTType { get }

A media format which may contain both video and audio. This type corresponds to what users would label a "movie". **UTI:** public.movie **conforms to:** public.audiovisual-content

static · iOS 14.0+

types

TypeScript
static types(tag: string, tagClass: UTTagClass, supertype?: (UTType) | null): Array<UTType>
Swift declaration
static func types(tag: String, tagClass: UTTagClass, conformingTo supertype: UTType?) -> [UTType]

Create an array of types given a type tag. - Parameters: - tag: The tag, such as a filename extension, for which a set of types is desired. - tagClass: The class of the tag, such as `.filenameExtension`. - supertype: Another type that the resulting types must conform to. If `nil`, no conformance is required. - Returns: An array of types, or the empty array if no such types were available. If no types are known to the system with the specified tag but the inputs were otherwise valid, a dynamic type may be provided.

get · iOS 14.0+

vCard

TypeScript
static get vCard(): UTType
Swift declaration
static var vCard: UTType { get }

A vCard file. **UTI:** public.vcard **conforms to:** public.text, public.contact

get · iOS 14.0+

video

TypeScript
static get video(): UTType
Swift declaration
static var video: UTType { get }

Pure video data with no audio data. **UTI:** public.video **conforms to:** public.movie

get · iOS 14.0+

bundle

TypeScript
static get bundle(): UTType
Swift declaration
static var bundle: UTType { get }

A directory conforming to one of the `CFBundle` layouts. Bundles differ from packages in that a bundle has an internal file hierarchy that `CFBundle` can read, while packages are displayed to the user as if they were regular files. A single file system object can be both a package and a bundle. **UTI:** com.apple.bundle **conforms to:** public.directory

get · iOS 14.0+

folder

TypeScript
static get folder(): UTType
Swift declaration
static var folder: UTType { get }

A user-browsable directory (i.e. not a package.) **UTI:** public.folder **conforms to:** public.directory

get · iOS 18.2+

jpegxl

TypeScript
static get jpegxl(): UTType
Swift declaration
static var jpegxl: UTType { get }

A JPEG-XL encoded image. **UTI:** public.jpeg-xl **conforms to:** public.image

get · iOS 14.0+

pkcs12

TypeScript
static get pkcs12(): UTType
Swift declaration
static var pkcs12: UTType { get }

PKCS#12 data. **UTI:** com.rsa.pkcs-12 **conforms to:** public.data

get · iOS 14.0+

script

TypeScript
static get script(): UTType
Swift declaration
static var script: UTType { get }

A base type for any scripting language source. **UTI:** public.script **conforms to:** public.source-code

get · iOS 14.0+

volume

TypeScript
static get volume(): UTType
Swift declaration
static var volume: UTType { get }

The root folder of a volume or mount point. **UTI:** public.volume **conforms to:** public.folder

get · iOS 14.0+

archive

TypeScript
static get archive(): UTType
Swift declaration
static var archive: UTType { get }

an archive of files and directories **UTI:** public.archive

get · iOS 14.0+

cHeader

TypeScript
static get cHeader(): UTType
Swift declaration
static var cHeader: UTType { get }

A C header. **UTI:** public.c-header **conforms to:** public.source-code

get · iOS 14.0+

cSource

TypeScript
static get cSource(): UTType
Swift declaration
static var cSource: UTType { get }

C source code (.c) **UTI:** public.c-source **conforms to:** public.source-code

get · iOS 14.0+

contact

TypeScript
static get contact(): UTType
Swift declaration
static var contact: UTType { get }

contact information, e.g. for a person, group, organization **UTI:** public.contact

get · iOS 14.0+

content

TypeScript
static get content(): UTType
Swift declaration
static var content: UTType { get }

A base type for anything containing user-viewable document content (documents, pasteboard data, and document packages.) Types describing files or packages must also conform to `UTType.data` or `UTType.package` in order for the system to bind documents to them. **UTI:** public.content

get · iOS 14.0+

fileURL

TypeScript
static get fileURL(): UTType
Swift declaration
static var fileURL: UTType { get }

A URL with the scheme `"file:"`. **UTI:** public.file-url **conforms to:** public.url

get · iOS 18.0+

geoJSON

TypeScript
static get geoJSON(): UTType
Swift declaration
static var geoJSON: UTType { get }

A GeoJSON file. **UTI:** public.geojson

get · iOS 14.0+

message

TypeScript
static get message(): UTType
Swift declaration
static var message: UTType { get }

A base type for messages (email, IM, etc.) **UTI:** public.message

get · iOS 14.0+

package

TypeScript
static get package(): UTType
Swift declaration
static var package: UTType { get }

A packaged directory. Bundles differ from packages in that a bundle has an internal file hierarchy that `CFBundle` can read, while packages are displayed to the user as if they were regular files. A single file system object can be both a package and a bundle. **UTI:** com.apple.package **conforms to:** public.directory

get · iOS 14.0+

version

TypeScript
get version(): (number) | null
Swift declaration
var version: Int? { get }

The type's version. Most types do not specify a version.

get · iOS 14.0+

bookmark

TypeScript
static get bookmark(): UTType
Swift declaration
static var bookmark: UTType { get }

A bookmark. **UTI:** public.bookmark - SeeAlso: UTType.urlBookmarkData

method · iOS 14.0+

conforms

TypeScript
conforms(type: UTType): boolean
Swift declaration
func conforms(to type: UTType) -> Bool

Tests for a conformance relationship between the receiver and another type. - Parameters: - type: The type against which conformance should be tested. - Returns: If the two types are equal, returns `true`. If the receiver conforms, directly or indirectly, to `type`, returns `true`. Otherwise, returns `false`. - SeeAlso: isSupertype(of:) - SeeAlso: isSubtype(of:)

get · iOS 14.0+

database

TypeScript
static get database(): UTType
Swift declaration
static var database: UTType { get }

A database store. **UTI:** public.database

get · iOS 14.0+

flatRTFD

TypeScript
static get flatRTFD(): UTType
Swift declaration
static var flatRTFD: UTType { get }

A flattened RTFD document (formatted for the pasteboard.) **UTI:** com.apple.flat-rtfd **conforms to:** public.data, public.composite-content

get · iOS 14.0+

isPublic

TypeScript
get isPublic(): boolean
Swift declaration
var isPublic: Bool { get }

Whether or not the type is in the public domain. Types in the public domain have identifiers starting with `"public."` and are generally defined by a standards body or by convention. They are never dynamic.

get · iOS 15.0+

makefile

TypeScript
static get makefile(): UTType
Swift declaration
static var makefile: UTType { get }

A makefile. **UTI:** public.make-source **conforms to:** public.script

get · iOS 27.0+

markdown

TypeScript
static get markdown(): UTType
Swift declaration
static var markdown: UTType { get }

Markdown data **UTI:** net.daringfireball.markdown **conforms to:** public.utf8-plain-text

get · iOS 14.0+

playlist

TypeScript
static get playlist(): UTType
Swift declaration
static var playlist: UTType { get }

The base type for playlists. **UTI:** public.playlist

get · iOS 14.0+

rawImage

TypeScript
static get rawImage(): UTType
Swift declaration
static var rawImage: UTType { get }

A base type for raw image data (.raw). **UTI:** public.camera-raw-image **conforms to:** public.image

get · iOS 14.0+

toDoItem

TypeScript
static get toDoItem(): UTType
Swift declaration
static var toDoItem: UTType { get }

A to-do item. **UTI:** public.to-do-item

get · iOS 14.0+

aliasFile

TypeScript
static get aliasFile(): UTType
Swift declaration
static var aliasFile: UTType { get }

A fully-formed alias file. **UTI:** com.apple.alias-file **conforms to:** public.data, com.apple.resolvable

get · iOS 14.0+

directory

TypeScript
static get directory(): UTType
Swift declaration
static var directory: UTType { get }

A file system directory (includes packages _and_ folders.) **UTI:** public.directory **conforms to:** public.item

get · iOS 14.0+

diskImage

TypeScript
static get diskImage(): UTType
Swift declaration
static var diskImage: UTType { get }

A data item mountable as a volume **UTI:** public.disk-image

get · iOS 14.0+

framework

TypeScript
static get framework(): UTType
Swift declaration
static var framework: UTType { get }

A macOS or iOS framework bundle. **UTI:** com.apple.framework **conforms to:** com.apple.bundle

get · iOS 14.0+

isDynamic

TypeScript
get isDynamic(): boolean
Swift declaration
var isDynamic: Bool { get }

Whether or not the receiver is a dynamically generated type. Dynamic types are recognized by the system, but may not be directly declared or claimed by an application. They are used when a file is encountered whose metadata has no corresponding type known to the system. A type cannot be both declared _and_ dynamic. You cannot construct an instance of `UTType` that is neither declared nor dynamic.

method · iOS 14.0+

isSubtype

TypeScript
isSubtype(type: UTType): boolean
Swift declaration
func isSubtype(of type: UTType) -> Bool

Tests if the receiver is a subtype of another type. - Parameters: - type: The type against which conformance should be tested. - Returns: If the receiver conforms, directly or indirectly, to `type` and is not equal to it, returns `true`. Otherwise, returns `false`. - SeeAlso: conforms(to:) - SeeAlso: isSupertype(of:)

get · iOS 14.0+

livePhoto

TypeScript
static get livePhoto(): UTType
Swift declaration
static var livePhoto: UTType { get }

A Live Photo. **UTI:** com.apple.live-photo

get · iOS 14.0+

osaScript

TypeScript
static get osaScript(): UTType
Swift declaration
static var osaScript: UTType { get }

An Open Scripting Architecture binary script (.scpt). **UTI:** com.apple.applescript.script **conforms to:** public.data, public.script

get · iOS 14.0+

phpScript

TypeScript
static get phpScript(): UTType
Swift declaration
static var phpScript: UTType { get }

A PHP script. **UTI:** public.php-script **conforms to:** public.shell-script

get · iOS 14.0+

plainText

TypeScript
static get plainText(): UTType
Swift declaration
static var plainText: UTType { get }

Text with no markup and an unspecified encoding. **UTI:** public.plain-text **conforms to:** public.text

init · iOS 14.0+

init

TypeScript
static init(identifier: string): (UTType) | null
Swift declaration
init?(_ identifier: String)

Create a type given a type identifier. - Parameters: - identifier: The type identifier. - Returns: A type, or `nil` if the type identifier is not known to the system.

Skipped declarations

No declarations were skipped in this snapshot.

All UniformTypeIdentifiers types →