Documentation
¶
Overview ¶
Package uniformtypeidentifiers provides Go bindings for the UniformTypeIdentifiers framework.
Provide uniform type identifiers that describe file types for storage or transfer.
The [Uniform Type Identifiers](<doc://com.apple.uniformtypeidentifiers/documentation/UniformTypeIdentifiers>) framework provides a collection of common types that map to MIME and file types. Use these types in your project to describe the file types in your app. These descriptions help the system properly handle file storage formats or in-memory data for transfer — for example, transferring data to or from the pasteboard. The identifier types can also identify other resources, such as directories, volumes, or packages.
Essentials ¶
- Defining file and data types for your app: Declare uniform type identifiers to support your app’s proprietary data formats.
- System-declared uniform type identifiers: Common types that the system declares.
Uniform type identifiers ¶
- UTType: A structure that represents a type of data to load, send, or receive.
- UTTagClass: A type that represents tag classes.
- UTTypeReference: An object that represents a type of data to load, send, or receive.
Key Types ¶
- UTType - An object that represents a type of data to load, send, or receive.
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Variables
- type IUTType
- type UTType
- func NewTypeExportedTypeWithIdentifier(identifier string) UTType
- func NewTypeExportedTypeWithIdentifierConformingToType(identifier string, parentType IUTType) UTType
- func NewTypeImportedTypeWithIdentifier(identifier string) UTType
- func NewTypeImportedTypeWithIdentifierConformingToType(identifier string, parentType IUTType) UTType
- func NewTypeWithFilenameExtension(filenameExtension string) UTType
- func NewTypeWithFilenameExtensionConformingToType(filenameExtension string, supertype IUTType) UTType
- func NewTypeWithIdentifier(identifier string) UTType
- func NewTypeWithMIMEType(mimeType string) UTType
- func NewTypeWithMIMETypeConformingToType(mimeType string, supertype IUTType) UTType
- func NewTypeWithTagTagClassConformingToType(tag string, tagClass string, supertype IUTType) UTType
- func NewUTType() UTType
- func UTTypeFromID(id objc.ID) UTType
- func (t UTType) Autorelease() UTType
- func (t UTType) ConformsToType(type_ IUTType) bool
- func (t UTType) Declared() bool
- func (t UTType) Dynamic() bool
- func (t UTType) EncodeWithCoder(coder foundation.INSCoder)
- func (t UTType) Identifier() string
- func (t UTType) Init() UTType
- func (t UTType) IsSubtypeOfType(type_ IUTType) bool
- func (t UTType) IsSupertypeOfType(type_ IUTType) bool
- func (t UTType) LocalizedDescription() string
- func (t UTType) PreferredFilenameExtension() string
- func (t UTType) PreferredMIMEType() string
- func (t UTType) PublicType() bool
- func (t UTType) ReferenceURL() foundation.INSURL
- func (t UTType) SetIdentifier(value string)
- func (t UTType) SetLocalizedDescription(value string)
- func (t UTType) SetPreferredFilenameExtension(value string)
- func (t UTType) SetPreferredMIMEType(value string)
- func (t UTType) SetReferenceURL(value foundation.INSURL)
- func (t UTType) SetShazamCustomCatalog(value IUTType)
- func (t UTType) SetShazamSignature(value IUTType)
- func (t UTType) SetSupertypes(value IUTType)
- func (t UTType) SetTags(value string)
- func (t UTType) SetVersion(value int)
- func (t UTType) ShazamCustomCatalog() IUTType
- func (t UTType) ShazamSignature() IUTType
- func (t UTType) Supertypes() IUTType
- func (t UTType) Tags() string
- func (t UTType) Version() int
- type UTTypeClass
- type UTTypeValues
- func (UTTypeValues) AHAP() UTType
- func (UTTypeValues) AIFF() UTType
- func (UTTypeValues) ARReferenceObject() UTType
- func (UTTypeValues) AVI() UTType
- func (UTTypeValues) AliasFile() UTType
- func (UTTypeValues) AppleArchive() UTType
- func (UTTypeValues) AppleProtectedMPEG4Audio() UTType
- func (UTTypeValues) AppleProtectedMPEG4Video() UTType
- func (UTTypeValues) AppleScript() UTType
- func (UTTypeValues) Application() UTType
- func (UTTypeValues) ApplicationBundle() UTType
- func (UTTypeValues) ApplicationExtension() UTType
- func (UTTypeValues) Archive() UTType
- func (UTTypeValues) AssemblyLanguageSource() UTType
- func (UTTypeValues) Audio() UTType
- func (UTTypeValues) AudiovisualContent() UTType
- func (UTTypeValues) BMP() UTType
- func (UTTypeValues) BZ2() UTType
- func (UTTypeValues) BinaryPropertyList() UTType
- func (UTTypeValues) Bookmark() UTType
- func (UTTypeValues) Bundle() UTType
- func (UTTypeValues) CHeader() UTType
- func (UTTypeValues) CPlusPlusHeader() UTType
- func (UTTypeValues) CPlusPlusSource() UTType
- func (UTTypeValues) CSS() UTType
- func (UTTypeValues) CSource() UTType
- func (UTTypeValues) CalendarEvent() UTType
- func (UTTypeValues) CommaSeparatedText() UTType
- func (UTTypeValues) CompositeContent() UTType
- func (UTTypeValues) Contact() UTType
- func (UTTypeValues) Content() UTType
- func (UTTypeValues) DNG() UTType
- func (UTTypeValues) Data() UTType
- func (UTTypeValues) Database() UTType
- func (UTTypeValues) DelimitedText() UTType
- func (UTTypeValues) Directory() UTType
- func (UTTypeValues) DiskImage() UTType
- func (UTTypeValues) EPUB() UTType
- func (UTTypeValues) EXE() UTType
- func (UTTypeValues) EXR() UTType
- func (UTTypeValues) EmailMessage() UTType
- func (UTTypeValues) Executable() UTType
- func (UTTypeValues) FileURL() UTType
- func (UTTypeValues) FlatRTFD() UTType
- func (UTTypeValues) Folder() UTType
- func (UTTypeValues) Font() UTType
- func (UTTypeValues) Framework() UTType
- func (UTTypeValues) GIF() UTType
- func (UTTypeValues) GZIP() UTType
- func (UTTypeValues) GeoJSON() UTType
- func (UTTypeValues) HEIC() UTType
- func (UTTypeValues) HEICS() UTType
- func (UTTypeValues) HEIF() UTType
- func (UTTypeValues) HTML() UTType
- func (UTTypeValues) ICNS() UTType
- func (UTTypeValues) ICO() UTType
- func (UTTypeValues) Image() UTType
- func (UTTypeValues) InternetLocation() UTType
- func (UTTypeValues) InternetShortcut() UTType
- func (UTTypeValues) Item() UTType
- func (UTTypeValues) JPEG() UTType
- func (UTTypeValues) JPEGXL() UTType
- func (UTTypeValues) JSON() UTType
- func (UTTypeValues) JavaScript() UTType
- func (UTTypeValues) LinkPresentationMetadata() UTType
- func (UTTypeValues) LivePhoto() UTType
- func (UTTypeValues) Log() UTType
- func (UTTypeValues) M3UPlaylist() UTType
- func (UTTypeValues) MIDI() UTType
- func (UTTypeValues) MP3() UTType
- func (UTTypeValues) MPEG() UTType
- func (UTTypeValues) MPEG2TransportStream() UTType
- func (UTTypeValues) MPEG2Video() UTType
- func (UTTypeValues) MPEG4Audio() UTType
- func (UTTypeValues) MPEG4Movie() UTType
- func (UTTypeValues) Makefile() UTType
- func (UTTypeValues) Message() UTType
- func (UTTypeValues) MountPoint() UTType
- func (UTTypeValues) Movie() UTType
- func (UTTypeValues) OSAScript() UTType
- func (UTTypeValues) OSAScriptBundle() UTType
- func (UTTypeValues) ObjectiveCPlusPlusSource() UTType
- func (UTTypeValues) ObjectiveCSource() UTType
- func (UTTypeValues) PDF() UTType
- func (UTTypeValues) PHPScript() UTType
- func (UTTypeValues) PKCS12() UTType
- func (UTTypeValues) PNG() UTType
- func (UTTypeValues) Package() UTType
- func (UTTypeValues) PerlScript() UTType
- func (UTTypeValues) PlainText() UTType
- func (UTTypeValues) Playlist() UTType
- func (UTTypeValues) PluginBundle() UTType
- func (UTTypeValues) Presentation() UTType
- func (UTTypeValues) PropertyList() UTType
- func (UTTypeValues) PythonScript() UTType
- func (UTTypeValues) QuickLookGenerator() UTType
- func (UTTypeValues) QuickTimeMovie() UTType
- func (UTTypeValues) RAWImage() UTType
- func (UTTypeValues) RTF() UTType
- func (UTTypeValues) RTFD() UTType
- func (UTTypeValues) RealityFile() UTType
- func (UTTypeValues) Resolvable() UTType
- func (UTTypeValues) RubyScript() UTType
- func (UTTypeValues) SVG() UTType
- func (UTTypeValues) SceneKitScene() UTType
- func (UTTypeValues) Script() UTType
- func (UTTypeValues) ShellScript() UTType
- func (UTTypeValues) SourceCode() UTType
- func (UTTypeValues) SpotlightImporter() UTType
- func (UTTypeValues) Spreadsheet() UTType
- func (UTTypeValues) SwiftSource() UTType
- func (UTTypeValues) SymbolicLink() UTType
- func (UTTypeValues) SystemPreferencesPane() UTType
- func (UTTypeValues) TIFF() UTType
- func (UTTypeValues) TabSeparatedText() UTType
- func (UTTypeValues) TarArchive() UTType
- func (UTTypeValues) Text() UTType
- func (UTTypeValues) ToDoItem() UTType
- func (UTTypeValues) URL() UTType
- func (UTTypeValues) URLBookmarkData() UTType
- func (UTTypeValues) USD() UTType
- func (UTTypeValues) USDZ() UTType
- func (UTTypeValues) UTF8PlainText() UTType
- func (UTTypeValues) UTF8TabSeparatedText() UTType
- func (UTTypeValues) UTF16ExternalPlainText() UTType
- func (UTTypeValues) UTF16PlainText() UTType
- func (UTTypeValues) UnixExecutable() UTType
- func (UTTypeValues) VCard() UTType
- func (UTTypeValues) Video() UTType
- func (UTTypeValues) Volume() UTType
- func (UTTypeValues) WAV() UTType
- func (UTTypeValues) WebArchive() UTType
- func (UTTypeValues) WebP() UTType
- func (UTTypeValues) X509Certificate() UTType
- func (UTTypeValues) XML() UTType
- func (UTTypeValues) XMLPropertyList() UTType
- func (UTTypeValues) XPCService() UTType
- func (UTTypeValues) YAML() UTType
- func (UTTypeValues) ZIP() UTType
Constants ¶
This section is empty.
Variables ¶
var UTTagClassFilenameExtension string
var UTTagClassMIMEType string
Functions ¶
This section is empty.
Types ¶
type IUTType ¶
type IUTType interface {
objectivec.IObject
// The string that represents the type.
Identifier() string
SetIdentifier(value string)
// The preferred filename extension for the type.
PreferredFilenameExtension() string
SetPreferredFilenameExtension(value string)
// The preferred MIME type for the type.
PreferredMIMEType() string
SetPreferredMIMEType(value string)
// The tag specification dictionary of the type.
Tags() string
SetTags(value string)
// A Boolean value that indicates whether the system declares the type.
Declared() bool
// A Boolean value that indicates whether the system generates the type.
Dynamic() bool
// A Boolean value that indicates whether the type is in the public domain.
PublicType() bool
// The reference URL for the type.
ReferenceURL() foundation.INSURL
SetReferenceURL(value foundation.INSURL)
// The type’s version, if available.
Version() int
SetVersion(value int)
// The set of types the type directly or indirectly conforms to.
Supertypes() IUTType
SetSupertypes(value IUTType)
// Returns a Boolean value that indicates whether a type conforms to the type.
ConformsToType(type_ IUTType) bool
// Returns a Boolean value that indicates whether a type is higher in a hierarchy than the type.
IsSubtypeOfType(type_ IUTType) bool
// Returns a Boolean value that indicates whether a type is lower in a hierarchy than the type.
IsSupertypeOfType(type_ IUTType) bool
// A localized description of the type.
LocalizedDescription() string
SetLocalizedDescription(value string)
// A type that represents a custom catalog.
ShazamCustomCatalog() IUTType
SetShazamCustomCatalog(value IUTType)
// A type that represents a signature.
ShazamSignature() IUTType
SetShazamSignature(value IUTType)
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the UTType class.
Identifying a type ¶
- [IUTType.Identifier]: The string that represents the type.
- [IUTType.SetIdentifier]
Obtaining tags ¶
- [IUTType.PreferredFilenameExtension]: The preferred filename extension for the type.
- [IUTType.SetPreferredFilenameExtension]
- [IUTType.PreferredMIMEType]: The preferred MIME type for the type.
- [IUTType.SetPreferredMIMEType]
- [IUTType.Tags]: The tag specification dictionary of the type.
- [IUTType.SetTags]
Obtaining additional type information ¶
- [IUTType.Declared]: A Boolean value that indicates whether the system declares the type.
- [IUTType.Dynamic]: A Boolean value that indicates whether the system generates the type.
- [IUTType.PublicType]: A Boolean value that indicates whether the type is in the public domain.
- [IUTType.ReferenceURL]: The reference URL for the type.
- [IUTType.SetReferenceURL]
- [IUTType.Version]: The type’s version, if available.
- [IUTType.SetVersion]
Checking a type’s relationship to another type ¶
- [IUTType.Supertypes]: The set of types the type directly or indirectly conforms to.
- [IUTType.SetSupertypes]
- [IUTType.ConformsToType]: Returns a Boolean value that indicates whether a type conforms to the type.
- [IUTType.IsSubtypeOfType]: Returns a Boolean value that indicates whether a type is higher in a hierarchy than the type.
- [IUTType.IsSupertypeOfType]: Returns a Boolean value that indicates whether a type is lower in a hierarchy than the type.
Describing a type ¶
- [IUTType.LocalizedDescription]: A localized description of the type.
- [IUTType.SetLocalizedDescription]
Type Properties ¶
- [IUTType.ShazamCustomCatalog]: A type that represents a custom catalog.
- [IUTType.SetShazamCustomCatalog]
- [IUTType.ShazamSignature]: A type that represents a signature.
- [IUTType.SetShazamSignature]
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference
type UTType ¶
type UTType struct {
objectivec.Object
}
An object that represents a type of data to load, send, or receive.
Overview ¶
The UTType object may represent files on disk, abstract data types with no on-disk representation, or entirely unrelated hierarchical classification systems, such as hardware. Each instance has a unique identifier, and helpful properties, preferredFilenameExtension and preferredMIMEType.
The UTType object may provide additional information related to the type. For example, it may include a localized user-facing description, a reference URL to technical documentation about the type, or its version number. You can look up types by their conformance to get either a type or a list of types that are relevant to your use case.
To define your own types in your app’s `Info.Plist()`, see Defining file and data types for your app.
Identifying a type ¶
- UTType.Identifier: The string that represents the type.
- UTType.SetIdentifier
Obtaining tags ¶
- UTType.PreferredFilenameExtension: The preferred filename extension for the type.
- UTType.SetPreferredFilenameExtension
- UTType.PreferredMIMEType: The preferred MIME type for the type.
- UTType.SetPreferredMIMEType
- UTType.Tags: The tag specification dictionary of the type.
- UTType.SetTags
Obtaining additional type information ¶
- UTType.Declared: A Boolean value that indicates whether the system declares the type.
- UTType.Dynamic: A Boolean value that indicates whether the system generates the type.
- UTType.PublicType: A Boolean value that indicates whether the type is in the public domain.
- UTType.ReferenceURL: The reference URL for the type.
- UTType.SetReferenceURL
- UTType.Version: The type’s version, if available.
- UTType.SetVersion
Checking a type’s relationship to another type ¶
- UTType.Supertypes: The set of types the type directly or indirectly conforms to.
- UTType.SetSupertypes
- UTType.ConformsToType: Returns a Boolean value that indicates whether a type conforms to the type.
- UTType.IsSubtypeOfType: Returns a Boolean value that indicates whether a type is higher in a hierarchy than the type.
- UTType.IsSupertypeOfType: Returns a Boolean value that indicates whether a type is lower in a hierarchy than the type.
Describing a type ¶
- UTType.LocalizedDescription: A localized description of the type.
- UTType.SetLocalizedDescription
Type Properties ¶
- UTType.ShazamCustomCatalog: A type that represents a custom catalog.
- UTType.SetShazamCustomCatalog
- UTType.ShazamSignature: A type that represents a signature.
- UTType.SetShazamSignature
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference
var UTType3DContent UTType
func NewTypeExportedTypeWithIdentifier ¶
Creates a type your app owns based on an identifier.
identifier: The identifier of your type.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/init(exportedAs:)
func NewTypeExportedTypeWithIdentifierConformingToType ¶
func NewTypeExportedTypeWithIdentifierConformingToType(identifier string, parentType IUTType) UTType
Creates a type your app owns based on an identifier and a supertype that it conforms to.
identifier: The identifier of your type.
parentType: A type to extend for your own type.
func NewTypeImportedTypeWithIdentifier ¶
Creates a type your app uses, but doesn’t own, based on an identifier.
identifier: The identifier of your type.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/init(importedAs:)
func NewTypeImportedTypeWithIdentifierConformingToType ¶
func NewTypeImportedTypeWithIdentifierConformingToType(identifier string, parentType IUTType) UTType
Creates a type your app uses, but doesn’t own, based on an identifier and a supertype that it conforms to.
identifier: The identifier of your type.
parentType: A type to extend with this type.
func NewTypeWithFilenameExtension ¶
Creates a type that represents the specified filename extension.
filenameExtension: The filename extension.
Discussion ¶
If the system recognizes the filename extension, the intializer returns the corresponding type; otherwise, the initializer returns a dynamic type whose isDeclared and isPublic properties are both set to false.
func NewTypeWithFilenameExtensionConformingToType ¶
func NewTypeWithFilenameExtensionConformingToType(filenameExtension string, supertype IUTType) UTType
Creates a type that represents the specified filename extension and conforms to an existing type.
filenameExtension: The filename extension.
supertype: The type the resulting type must conform to, such as [data] or [package]. // [data]: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTType-swift.struct/data [package]: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTType-swift.struct/package
Discussion ¶
If the system recognizes the filename extension, the intializer returns the corresponding type; otherwise, the initializer returns a dynamic type whose isDeclared and isPublic properties are both set to false.
func NewTypeWithIdentifier ¶
Creates a type based on an identifier.
identifier: The identifier of your type.
Discussion ¶
This initializer returns `nil` if the system doesn’t know the type identifier.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/init(_:)
func NewTypeWithMIMEType ¶
Creates a type based on a MIME type.
mimeType: A string that represents the MIME type.
Discussion ¶
This initializer returns `nil` if the system doesn’t know the MIME type.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/init(mimeType:)
func NewTypeWithMIMETypeConformingToType ¶
Creates a type based on a MIME type and a supertype that it conforms to.
mimeType: A string that represents the MIME type.
supertype: Another UTType instance that the resulting type must conform to; for example, [UTTypeData]. // [UTTypeData]: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeData UTType: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTType-swift.struct
Discussion ¶
This initializer returns `nil` if the system doesn’t know the MIME type.
func NewTypeWithTagTagClassConformingToType ¶
Creates a type that represents the specified tag and tag class and which conforms to an existing type.
tag: The tag, such as a filename extension.
tagClass: The appropriate tag class, such as [filenameExtension]. // [filenameExtension]: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTagClass/filenameExtension
supertype: The type the resulting type must conform to, such as [data]. // [data]: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTType-swift.struct/data
Discussion ¶
If the system recognizes the filename extension, the intializer returns the corresponding type; otherwise, the initializer returns a dynamic type whose isDeclared and isPublic properties are both set to false.
func UTTypeFromID ¶
UTTypeFromID constructs a UTType from an objc.ID.
An object that represents a type of data to load, send, or receive.
func (UTType) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (UTType) ConformsToType ¶
Returns a Boolean value that indicates whether a type conforms to the type.
type: An UTType instance. // UTType: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTType-swift.struct
Return Value ¶
true if the type directly or indirectly conforms to `type`, or if it’s equal to `type`.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/conforms(to:)
func (UTType) Declared ¶
A Boolean value that indicates whether the system declares the type.
Discussion ¶
The system either declares a type or dynamically generates a type, but not both.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/isDeclared
func (UTType) Dynamic ¶
A Boolean value that indicates whether the system generates the type.
Discussion ¶
The system recognizes dynamic types, but they may not be directly declared or claimed by an app. The system returns dynamic types when it encounters a file whose metadata doesn’t have a corresponding type known to the system.
The system either declares a type or dynamically generates a type, but not both.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/isDynamic
func (UTType) EncodeWithCoder ¶
func (t UTType) EncodeWithCoder(coder foundation.INSCoder)
func (UTType) Identifier ¶
The string that represents the type.
See: https://developer.apple.com/documentation/uniformtypeidentifiers/uttype-swift.struct/identifier
func (UTType) IsSubtypeOfType ¶
Returns a Boolean value that indicates whether a type is higher in a hierarchy than the type.
type: A UTType instance. // UTType: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTType-swift.struct
Return Value ¶
true if the type directly or indirectly conforms to `type`, but returns false if it’s equal to `type`.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/isSubtype(of:)
func (UTType) IsSupertypeOfType ¶
Returns a Boolean value that indicates whether a type is lower in a hierarchy than the type.
type: A UTType instance. // UTType: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTType-swift.struct
Return Value ¶
true if `type` directly or indirectly conforms to the type, but returns false if it’s equal to the type.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/isSupertype(of:)
func (UTType) LocalizedDescription ¶
A localized description of the type.
func (UTType) PreferredFilenameExtension ¶
The preferred filename extension for the type.
func (UTType) PreferredMIMEType ¶
The preferred MIME type for the type.
func (UTType) PublicType ¶
A Boolean value that indicates whether the type is in the public domain.
Discussion ¶
Types in the public domain have identifiers starting with `public`, and are generally defined by a standards body or by convention. Public types aren’t dynamic.
See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeReference/isPublic
func (UTType) ReferenceURL ¶
func (t UTType) ReferenceURL() foundation.INSURL
The reference URL for the type.
See: https://developer.apple.com/documentation/uniformtypeidentifiers/uttype-swift.struct/referenceurl
func (UTType) SetIdentifier ¶
func (UTType) SetLocalizedDescription ¶
func (UTType) SetPreferredFilenameExtension ¶
func (UTType) SetPreferredMIMEType ¶
func (UTType) SetReferenceURL ¶
func (t UTType) SetReferenceURL(value foundation.INSURL)
func (UTType) SetShazamCustomCatalog ¶
func (UTType) SetShazamSignature ¶
func (UTType) SetSupertypes ¶
func (UTType) SetVersion ¶
func (UTType) ShazamCustomCatalog ¶
A type that represents a custom catalog.
func (UTType) ShazamSignature ¶
A type that represents a signature.
See: https://developer.apple.com/documentation/uniformtypeidentifiers/uttype-swift.struct/shazamsignature
func (UTType) Supertypes ¶
The set of types the type directly or indirectly conforms to.
See: https://developer.apple.com/documentation/uniformtypeidentifiers/uttype-swift.struct/supertypes
func (UTType) Tags ¶
The tag specification dictionary of the type.
See: https://developer.apple.com/documentation/uniformtypeidentifiers/uttype-swift.struct/tags
func (UTType) Version ¶
The type’s version, if available.
See: https://developer.apple.com/documentation/uniformtypeidentifiers/uttype-swift.struct/version
type UTTypeClass ¶
type UTTypeClass struct {
// contains filtered or unexported fields
}
func GetUTTypeClass ¶
func GetUTTypeClass() UTTypeClass
GetUTTypeClass returns the class object for UTType.
func (UTTypeClass) Alloc ¶
func (uc UTTypeClass) Alloc() UTType
Alloc allocates memory for a new instance of the class.
func (UTTypeClass) TypesWithTagTagClassConformingToType ¶
func (_UTTypeClass UTTypeClass) TypesWithTagTagClassConformingToType(tag string, tagClass string, supertype IUTType) []UTType
Returns an array of types from the provided tag and tag class.
tag: The desired tag, such as a filename extension.
tagClass: The tag class, such as UTTagClassFilenameExtension. // UTTagClassFilenameExtension: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTagClassFilenameExtension
supertype: Another type that the resulting type must conform to; for example, [UTTypeData]. // [UTTypeData]: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTypeData
type UTTypeValues ¶
type UTTypeValues struct{}
var UTTypes UTTypeValues
UTTypes provides typed accessors for UTType constants.
func (UTTypeValues) AHAP ¶
func (UTTypeValues) AHAP() UTType
func (UTTypeValues) AIFF ¶
func (UTTypeValues) AIFF() UTType
AIFF returns A type that represents data in AIFF audio format.
func (UTTypeValues) ARReferenceObject ¶
func (UTTypeValues) ARReferenceObject() UTType
ARReferenceObject returns A type that represents an augmented reality reference object.
func (UTTypeValues) AVI ¶
func (UTTypeValues) AVI() UTType
AVI returns A type that represents data in AVI movie format.
func (UTTypeValues) AliasFile ¶
func (UTTypeValues) AliasFile() UTType
AliasFile returns A type that represents an alias file.
func (UTTypeValues) AppleArchive ¶
func (UTTypeValues) AppleArchive() UTType
AppleArchive returns A type that represents an Apple archive of files and directories.
func (UTTypeValues) AppleProtectedMPEG4Audio ¶
func (UTTypeValues) AppleProtectedMPEG4Audio() UTType
AppleProtectedMPEG4Audio returns A type that represents data in Apple-protected MPEG-4 format.
func (UTTypeValues) AppleProtectedMPEG4Video ¶
func (UTTypeValues) AppleProtectedMPEG4Video() UTType
AppleProtectedMPEG4Video returns A type that represents data in Apple-protected MPEG-4 format.
func (UTTypeValues) AppleScript ¶
func (UTTypeValues) AppleScript() UTType
AppleScript returns A type that represents an AppleScript text-based script.
func (UTTypeValues) Application ¶
func (UTTypeValues) Application() UTType
Application returns A base type that represents a macOS, iOS, iPadOS, watchOS, and tvOS app.
func (UTTypeValues) ApplicationBundle ¶
func (UTTypeValues) ApplicationBundle() UTType
ApplicationBundle returns A type that represents a bundled app.
func (UTTypeValues) ApplicationExtension ¶
func (UTTypeValues) ApplicationExtension() UTType
ApplicationExtension returns A type that represents an app extension.
func (UTTypeValues) Archive ¶
func (UTTypeValues) Archive() UTType
Archive returns A base type that represents an archive of files and directories.
func (UTTypeValues) AssemblyLanguageSource ¶
func (UTTypeValues) AssemblyLanguageSource() UTType
AssemblyLanguageSource returns A type that represents assembly language source code.
func (UTTypeValues) Audio ¶
func (UTTypeValues) Audio() UTType
Audio returns A type that represents audio that doesn’t contain video.
func (UTTypeValues) AudiovisualContent ¶
func (UTTypeValues) AudiovisualContent() UTType
AudiovisualContent returns A base type that represents data that contains video content that may or may not also include audio.
func (UTTypeValues) BMP ¶
func (UTTypeValues) BMP() UTType
BMP returns A type that represents a Windows bitmap image.
func (UTTypeValues) BZ2 ¶
func (UTTypeValues) BZ2() UTType
BZ2 returns A type that represents a bzip2 archive.
func (UTTypeValues) BinaryPropertyList ¶
func (UTTypeValues) BinaryPropertyList() UTType
BinaryPropertyList returns A type that represents a binary property list.
func (UTTypeValues) Bookmark ¶
func (UTTypeValues) Bookmark() UTType
Bookmark returns A base type that represents bookmark data.
func (UTTypeValues) Bundle ¶
func (UTTypeValues) Bundle() UTType
Bundle returns A base type that represents a directory that conforms to one of the bundle layouts.
func (UTTypeValues) CHeader ¶
func (UTTypeValues) CHeader() UTType
CHeader returns A type that represents a C header file.
func (UTTypeValues) CPlusPlusHeader ¶
func (UTTypeValues) CPlusPlusHeader() UTType
CPlusPlusHeader returns A type that represents a C++ header file.
func (UTTypeValues) CPlusPlusSource ¶
func (UTTypeValues) CPlusPlusSource() UTType
CPlusPlusSource returns A type that represents a C++ source code file.
func (UTTypeValues) CSS ¶
func (UTTypeValues) CSS() UTType
func (UTTypeValues) CSource ¶
func (UTTypeValues) CSource() UTType
CSource returns A type that represents a C source code file.
func (UTTypeValues) CalendarEvent ¶
func (UTTypeValues) CalendarEvent() UTType
CalendarEvent returns A base type that represents a calendar event.
func (UTTypeValues) CommaSeparatedText ¶
func (UTTypeValues) CommaSeparatedText() UTType
CommaSeparatedText returns A type that represents text containing comma-separated values.
func (UTTypeValues) CompositeContent ¶
func (UTTypeValues) CompositeContent() UTType
CompositeContent returns A base type that represents a content format supporting mixed embedded content.
func (UTTypeValues) Contact ¶
func (UTTypeValues) Contact() UTType
Contact returns A base type that represents contact information.
func (UTTypeValues) Content ¶
func (UTTypeValues) Content() UTType
Content returns A base type that represents anything containing user-viewable content.
func (UTTypeValues) DNG ¶
func (UTTypeValues) DNG() UTType
func (UTTypeValues) Data ¶
func (UTTypeValues) Data() UTType
Data returns A base type that represents any sort of byte stream, including files and in-memory data.
func (UTTypeValues) Database ¶
func (UTTypeValues) Database() UTType
Database returns A base type that represents a database store.
func (UTTypeValues) DelimitedText ¶
func (UTTypeValues) DelimitedText() UTType
DelimitedText returns A base type that represents text containing delimited values.
func (UTTypeValues) Directory ¶
func (UTTypeValues) Directory() UTType
Directory returns A type that represents a file system directory, including packages and folders.
func (UTTypeValues) DiskImage ¶
func (UTTypeValues) DiskImage() UTType
DiskImage returns A type that represents a data item that’s mountable as a volume.
func (UTTypeValues) EPUB ¶
func (UTTypeValues) EPUB() UTType
EPUB returns A type that represents data in the electronic publication (EPUB) format.
func (UTTypeValues) EXE ¶
func (UTTypeValues) EXE() UTType
EXE returns A type that represents a Windows executable.
func (UTTypeValues) EXR ¶
func (UTTypeValues) EXR() UTType
func (UTTypeValues) EmailMessage ¶
func (UTTypeValues) EmailMessage() UTType
EmailMessage returns A type that represents an email message.
func (UTTypeValues) Executable ¶
func (UTTypeValues) Executable() UTType
Executable returns A type that represents an executable.
func (UTTypeValues) FileURL ¶
func (UTTypeValues) FileURL() UTType
FileURL returns A type that represents a URL to a file in the file system.
func (UTTypeValues) FlatRTFD ¶
func (UTTypeValues) FlatRTFD() UTType
FlatRTFD returns A type that represents flattened Rich Text Format Directory documents.
func (UTTypeValues) Folder ¶
func (UTTypeValues) Folder() UTType
Folder returns A type that represents a user-browsable directory.
func (UTTypeValues) Font ¶
func (UTTypeValues) Font() UTType
Font returns A base type that represents a font.
func (UTTypeValues) Framework ¶
func (UTTypeValues) Framework() UTType
Framework returns A type that represents an Apple framework bundle.
func (UTTypeValues) GIF ¶
func (UTTypeValues) GIF() UTType
GIF returns A type that represents a GIF image.
func (UTTypeValues) GZIP ¶
func (UTTypeValues) GZIP() UTType
GZIP returns A type that represents a GNU zip archive.
func (UTTypeValues) GeoJSON ¶
func (UTTypeValues) GeoJSON() UTType
func (UTTypeValues) HEIC ¶
func (UTTypeValues) HEIC() UTType
HEIC returns A type that represents High Efficiency Image Coding images.
func (UTTypeValues) HEICS ¶
func (UTTypeValues) HEICS() UTType
func (UTTypeValues) HEIF ¶
func (UTTypeValues) HEIF() UTType
HEIF returns A type that represents High Efficiency Image File Format images.
func (UTTypeValues) HTML ¶
func (UTTypeValues) HTML() UTType
HTML returns A type that represents any version of HTML.
func (UTTypeValues) ICNS ¶
func (UTTypeValues) ICNS() UTType
ICNS returns A type that represents Apple icon data.
func (UTTypeValues) ICO ¶
func (UTTypeValues) ICO() UTType
ICO returns A type that represents Windows icon data.
func (UTTypeValues) Image ¶
func (UTTypeValues) Image() UTType
Image returns A base type that represents image data.
func (UTTypeValues) InternetLocation ¶
func (UTTypeValues) InternetLocation() UTType
InternetLocation returns A base type that represents an Apple internet location file.
func (UTTypeValues) InternetShortcut ¶
func (UTTypeValues) InternetShortcut() UTType
InternetShortcut returns A type that represents a Microsoft internet shortcut file.
func (UTTypeValues) Item ¶
func (UTTypeValues) Item() UTType
Item returns A generic base type for most objects, such as files or directories.
func (UTTypeValues) JPEG ¶
func (UTTypeValues) JPEG() UTType
JPEG returns A type that represents a JPEG image.
func (UTTypeValues) JPEGXL ¶
func (UTTypeValues) JPEGXL() UTType
func (UTTypeValues) JSON ¶
func (UTTypeValues) JSON() UTType
JSON returns A type that represents JavaScript Object Notation (JSON) data.
func (UTTypeValues) JavaScript ¶
func (UTTypeValues) JavaScript() UTType
JavaScript returns A type that represents JavaScript source code.
func (UTTypeValues) LinkPresentationMetadata ¶
func (UTTypeValues) LinkPresentationMetadata() UTType
func (UTTypeValues) LivePhoto ¶
func (UTTypeValues) LivePhoto() UTType
LivePhoto returns A type that represents Live Photos.
func (UTTypeValues) Log ¶
func (UTTypeValues) Log() UTType
Log returns A base type that represents console log data.
func (UTTypeValues) M3UPlaylist ¶
func (UTTypeValues) M3UPlaylist() UTType
M3UPlaylist returns A type that represents an M3U or M3U8 playlist.
func (UTTypeValues) MIDI ¶
func (UTTypeValues) MIDI() UTType
MIDI returns A type that represents data in MIDI audio format.
func (UTTypeValues) MP3 ¶
func (UTTypeValues) MP3() UTType
MP3 returns A type that represents MP3 audio.
func (UTTypeValues) MPEG ¶
func (UTTypeValues) MPEG() UTType
MPEG returns A type that represents an MPEG-1 or MPEG-2 movie.
func (UTTypeValues) MPEG2TransportStream ¶
func (UTTypeValues) MPEG2TransportStream() UTType
MPEG2TransportStream returns A type that represents data in MPEG-2 transport stream movie format.
func (UTTypeValues) MPEG2Video ¶
func (UTTypeValues) MPEG2Video() UTType
MPEG2Video returns A type that represents an MPEG-2 video.
func (UTTypeValues) MPEG4Audio ¶
func (UTTypeValues) MPEG4Audio() UTType
MPEG4Audio returns A type that represents an MPEG-4 audio layer file.
func (UTTypeValues) MPEG4Movie ¶
func (UTTypeValues) MPEG4Movie() UTType
MPEG4Movie returns A type that represents an MPEG-4 movie.
func (UTTypeValues) Makefile ¶
func (UTTypeValues) Makefile() UTType
Makefile returns A type that represents a Makefile.
func (UTTypeValues) Message ¶
func (UTTypeValues) Message() UTType
Message returns A base type that represents a message.
func (UTTypeValues) MountPoint ¶
func (UTTypeValues) MountPoint() UTType
MountPoint returns A type that represents a volume mount point.
func (UTTypeValues) Movie ¶
func (UTTypeValues) Movie() UTType
Movie returns A base type representing media formats that may contain both video and audio.
func (UTTypeValues) OSAScript ¶
func (UTTypeValues) OSAScript() UTType
OSAScript returns A type that represents an Open Scripting Architecture binary script.
func (UTTypeValues) OSAScriptBundle ¶
func (UTTypeValues) OSAScriptBundle() UTType
OSAScriptBundle returns A type that represents an Open Scripting Architecture script bundle.
func (UTTypeValues) ObjectiveCPlusPlusSource ¶
func (UTTypeValues) ObjectiveCPlusPlusSource() UTType
ObjectiveCPlusPlusSource returns A type that represents an Objective-C++ source code file.
func (UTTypeValues) ObjectiveCSource ¶
func (UTTypeValues) ObjectiveCSource() UTType
ObjectiveCSource returns A type that represents an Objective-C source code file.
func (UTTypeValues) PDF ¶
func (UTTypeValues) PDF() UTType
PDF returns A type that represents Adobe Portable Document Format (PDF) documents.
func (UTTypeValues) PHPScript ¶
func (UTTypeValues) PHPScript() UTType
PHPScript returns A type that represents a PHP script.
func (UTTypeValues) PKCS12 ¶
func (UTTypeValues) PKCS12() UTType
PKCS12 returns A type that represents Public Key Cryptography Standard (PKCS) 12 data.
func (UTTypeValues) PNG ¶
func (UTTypeValues) PNG() UTType
PNG returns A type that represents a PNG image.
func (UTTypeValues) Package ¶
func (UTTypeValues) Package() UTType
Package returns A base type that represents a packaged directory.
func (UTTypeValues) PerlScript ¶
func (UTTypeValues) PerlScript() UTType
PerlScript returns A type that represents a Perl script.
func (UTTypeValues) PlainText ¶
func (UTTypeValues) PlainText() UTType
PlainText returns A type that represents text with no markup and an unspecified encoding.
func (UTTypeValues) Playlist ¶
func (UTTypeValues) Playlist() UTType
Playlist returns A base type that represents a playlist.
func (UTTypeValues) PluginBundle ¶
func (UTTypeValues) PluginBundle() UTType
PluginBundle returns A base type that represents a bundle-based plug-in.
func (UTTypeValues) Presentation ¶
func (UTTypeValues) Presentation() UTType
Presentation returns A base type that represents a presentation document.
func (UTTypeValues) PropertyList ¶
func (UTTypeValues) PropertyList() UTType
PropertyList returns A base type that represents a property list.
func (UTTypeValues) PythonScript ¶
func (UTTypeValues) PythonScript() UTType
PythonScript returns A type that represents a Python script.
func (UTTypeValues) QuickLookGenerator ¶
func (UTTypeValues) QuickLookGenerator() UTType
QuickLookGenerator returns A type that represents a QuickLook preview generator bundle.
func (UTTypeValues) QuickTimeMovie ¶
func (UTTypeValues) QuickTimeMovie() UTType
QuickTimeMovie returns A type that represents a QuickTime movie.
func (UTTypeValues) RAWImage ¶
func (UTTypeValues) RAWImage() UTType
RAWImage returns A base type that represents a raw image format that you use in digital photography.
func (UTTypeValues) RTF ¶
func (UTTypeValues) RTF() UTType
RTF returns A type that represents Rich Text Format data.
func (UTTypeValues) RTFD ¶
func (UTTypeValues) RTFD() UTType
RTFD returns A type that represents Rich Text Format Directory documents.
func (UTTypeValues) RealityFile ¶
func (UTTypeValues) RealityFile() UTType
RealityFile returns A type that represents a Reality Composer file.
func (UTTypeValues) Resolvable ¶
func (UTTypeValues) Resolvable() UTType
Resolvable returns A base type that represents a resolvable reference, including symbolic links and aliases.
func (UTTypeValues) RubyScript ¶
func (UTTypeValues) RubyScript() UTType
RubyScript returns A type that represents a Ruby script.
func (UTTypeValues) SVG ¶
func (UTTypeValues) SVG() UTType
SVG returns A type that represents a scalable vector graphics (SVG) image.
func (UTTypeValues) SceneKitScene ¶
func (UTTypeValues) SceneKitScene() UTType
SceneKitScene returns A type that represents a SceneKit serialized scene.
func (UTTypeValues) Script ¶
func (UTTypeValues) Script() UTType
Script returns A base type that represents any scripting language source.
func (UTTypeValues) ShellScript ¶
func (UTTypeValues) ShellScript() UTType
ShellScript returns A base type that represents a shell script.
func (UTTypeValues) SourceCode ¶
func (UTTypeValues) SourceCode() UTType
SourceCode returns A base type that represents source code of any programming language.
func (UTTypeValues) SpotlightImporter ¶
func (UTTypeValues) SpotlightImporter() UTType
SpotlightImporter returns A type that represents a Spotlight metadata importer bundle.
func (UTTypeValues) Spreadsheet ¶
func (UTTypeValues) Spreadsheet() UTType
Spreadsheet returns A base type that represents a spreadsheet document.
func (UTTypeValues) SwiftSource ¶
func (UTTypeValues) SwiftSource() UTType
SwiftSource returns A type that represents a Swift source code file.
func (UTTypeValues) SymbolicLink ¶
func (UTTypeValues) SymbolicLink() UTType
SymbolicLink returns A type that represents a symbolic link.
func (UTTypeValues) SystemPreferencesPane ¶
func (UTTypeValues) SystemPreferencesPane() UTType
SystemPreferencesPane returns A type that represents a System Preferences pane.
func (UTTypeValues) TIFF ¶
func (UTTypeValues) TIFF() UTType
TIFF returns A type that represents a TIFF image.
func (UTTypeValues) TabSeparatedText ¶
func (UTTypeValues) TabSeparatedText() UTType
TabSeparatedText returns A type that represents text containing tab-separated values.
func (UTTypeValues) TarArchive ¶
func (UTTypeValues) TarArchive() UTType
func (UTTypeValues) Text ¶
func (UTTypeValues) Text() UTType
Text returns A base type that represents all text-encoded data, including text with markup.
func (UTTypeValues) ToDoItem ¶
func (UTTypeValues) ToDoItem() UTType
ToDoItem returns A type that represents a to-do item.
func (UTTypeValues) URL ¶
func (UTTypeValues) URL() UTType
URL returns A type that represents a URL.
func (UTTypeValues) URLBookmarkData ¶
func (UTTypeValues) URLBookmarkData() UTType
URLBookmarkData returns A type that represents a URL bookmark.
func (UTTypeValues) USD ¶
func (UTTypeValues) USD() UTType
USD returns A type that represents Universal Scene Description content.
func (UTTypeValues) USDZ ¶
func (UTTypeValues) USDZ() UTType
USDZ returns A type that represents Universal Scene Description Package content.
func (UTTypeValues) UTF8PlainText ¶
func (UTTypeValues) UTF8PlainText() UTType
UTF8PlainText returns A type that represents plain text encoded as UTF-8.
func (UTTypeValues) UTF8TabSeparatedText ¶
func (UTTypeValues) UTF8TabSeparatedText() UTType
UTF8TabSeparatedText returns A type that represents UTF-8–encoded text containing tab-separated values.
func (UTTypeValues) UTF16ExternalPlainText ¶
func (UTTypeValues) UTF16ExternalPlainText() UTType
UTF16ExternalPlainText returns A type that represents plain text encoded as UTF-16 with an optional BOM.
func (UTTypeValues) UTF16PlainText ¶
func (UTTypeValues) UTF16PlainText() UTType
UTF16PlainText returns A type that represents plain text encoded as UTF-16 in native byte order with an optional bill of materials.
func (UTTypeValues) UnixExecutable ¶
func (UTTypeValues) UnixExecutable() UTType
UnixExecutable returns A type that represents a UNIX executable.
func (UTTypeValues) VCard ¶
func (UTTypeValues) VCard() UTType
VCard returns A type that represents a vCard file.
func (UTTypeValues) Video ¶
func (UTTypeValues) Video() UTType
Video returns A type that represents video that doesn’t contain audio.
func (UTTypeValues) Volume ¶
func (UTTypeValues) Volume() UTType
Volume returns A type that represents the root folder of a volume or mount point.
func (UTTypeValues) WAV ¶
func (UTTypeValues) WAV() UTType
WAV returns A type that represents data in Microsoft Waveform Audio File Format.
func (UTTypeValues) WebArchive ¶
func (UTTypeValues) WebArchive() UTType
WebArchive returns A type that represents WebKit web archive data.
func (UTTypeValues) WebP ¶
func (UTTypeValues) WebP() UTType
WebP returns A type that represents a WebP image.
func (UTTypeValues) X509Certificate ¶
func (UTTypeValues) X509Certificate() UTType
X509Certificate returns A type that represents an X.509 certificate.
func (UTTypeValues) XML ¶
func (UTTypeValues) XML() UTType
XML returns A type that represents generic XML data.
func (UTTypeValues) XMLPropertyList ¶
func (UTTypeValues) XMLPropertyList() UTType
XMLPropertyList returns A type that represents an XML property list.
func (UTTypeValues) XPCService ¶
func (UTTypeValues) XPCService() UTType
XPCService returns A type that represents an XPC service bundle.
func (UTTypeValues) YAML ¶
func (UTTypeValues) YAML() UTType
YAML returns A type that represents Yet Another Markup Language data.
func (UTTypeValues) ZIP ¶
func (UTTypeValues) ZIP() UTType
ZIP returns A type that represents a zip archive.