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
Constants ¶
This section is empty.
Variables ¶
var ( // UTTagClassFilenameExtension is the string identifier for the tag that maps to filename extensions. // // See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTagClassFilenameExtension UTTagClassFilenameExtension string // UTTagClassMIMEType is the string identifier for the tag that maps to MIME types. // // See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTTagClassMIMEType UTTagClassMIMEType string )
var UTTypes struct { AHAP UTType // AIFF: A type that represents data in AIFF audio format. AIFF UTType // ARReferenceObject: A type that represents an augmented reality reference object. ARReferenceObject UTType // AVI: A type that represents data in AVI movie format. AVI UTType // AliasFile: A type that represents an alias file. AliasFile UTType // AppleArchive: A type that represents an Apple archive of files and directories. AppleArchive UTType // AppleProtectedMPEG4Audio: A type that represents data in Apple-protected MPEG-4 format. AppleProtectedMPEG4Audio UTType // AppleProtectedMPEG4Video: A type that represents data in Apple-protected MPEG-4 format. AppleProtectedMPEG4Video UTType // AppleScript: A type that represents an AppleScript text-based script. AppleScript UTType // Application: A base type that represents a macOS, iOS, iPadOS, watchOS, and tvOS app. Application UTType // ApplicationBundle: A type that represents a bundled app. ApplicationBundle UTType // ApplicationExtension: A type that represents an app extension. ApplicationExtension UTType // Archive: A base type that represents an archive of files and directories. Archive UTType // AssemblyLanguageSource: A type that represents assembly language source code. AssemblyLanguageSource UTType // Audio: A type that represents audio that doesn’t contain video. Audio UTType // AudiovisualContent: A base type that represents data that contains video content that may or may not also include audio. AudiovisualContent UTType // BMP: A type that represents a Windows bitmap image. BMP UTType // BZ2: A type that represents a bzip2 archive. BZ2 UTType // BinaryPropertyList: A type that represents a binary property list. BinaryPropertyList UTType // Bookmark: A base type that represents bookmark data. Bookmark UTType // Bundle: A base type that represents a directory that conforms to one of the bundle layouts. Bundle UTType // CHeader: A type that represents a C header file. CHeader UTType // CPlusPlusHeader: A type that represents a C++ header file. CPlusPlusHeader UTType // CPlusPlusSource: A type that represents a C++ source code file. CPlusPlusSource UTType CSS UTType // CSource: A type that represents a C source code file. CSource UTType // CalendarEvent: A base type that represents a calendar event. CalendarEvent UTType // CommaSeparatedText: A type that represents text containing comma-separated values. CommaSeparatedText UTType // CompositeContent: A base type that represents a content format supporting mixed embedded content. CompositeContent UTType // Contact: A base type that represents contact information. Contact UTType // Content: A base type that represents anything containing user-viewable content. Content UTType DNG UTType // Data: A base type that represents any sort of byte stream, including files and in-memory data. Data UTType // Database: A base type that represents a database store. Database UTType // DelimitedText: A base type that represents text containing delimited values. DelimitedText UTType // Directory: A type that represents a file system directory, including packages and folders. Directory UTType // DiskImage: A type that represents a data item that’s mountable as a volume. DiskImage UTType // EPUB: A type that represents data in the electronic publication (EPUB) format. EPUB UTType // EXE: A type that represents a Windows executable. EXE UTType EXR UTType // EmailMessage: A type that represents an email message. EmailMessage UTType // Executable: A type that represents an executable. Executable UTType // FileURL: A type that represents a URL to a file in the file system. FileURL UTType // FlatRTFD: A type that represents flattened Rich Text Format Directory documents. FlatRTFD UTType // Folder: A type that represents a user-browsable directory. Folder UTType // Font: A base type that represents a font. Font UTType // Framework: A type that represents an Apple framework bundle. Framework UTType // GIF: A type that represents a GIF image. GIF UTType // GZIP: A type that represents a GNU zip archive. GZIP UTType GeoJSON UTType // HEIC: A type that represents High Efficiency Image Coding images. HEIC UTType HEICS UTType // HEIF: A type that represents High Efficiency Image File Format images. HEIF UTType // HTML: A type that represents any version of HTML. HTML UTType // ICNS: A type that represents Apple icon data. ICNS UTType // ICO: A type that represents Windows icon data. ICO UTType // Image: A base type that represents image data. Image UTType // InternetLocation: A base type that represents an Apple internet location file. InternetLocation UTType // InternetShortcut: A type that represents a Microsoft internet shortcut file. InternetShortcut UTType // Item: A generic base type for most objects, such as files or directories. Item UTType // JPEG: A type that represents a JPEG image. JPEG UTType JPEGXL UTType // JSON: A type that represents JavaScript Object Notation (JSON) data. JSON UTType // JavaScript: A type that represents JavaScript source code. JavaScript UTType LinkPresentationMetadata UTType // LivePhoto: A type that represents Live Photos. LivePhoto UTType // Log: A base type that represents console log data. Log UTType // M3UPlaylist: A type that represents an M3U or M3U8 playlist. M3UPlaylist UTType // MIDI: A type that represents data in MIDI audio format. MIDI UTType // MP3: A type that represents MP3 audio. MP3 UTType // MPEG: A type that represents an MPEG-1 or MPEG-2 movie. MPEG UTType // MPEG2TransportStream: A type that represents data in MPEG-2 transport stream movie format. MPEG2TransportStream UTType // MPEG2Video: A type that represents an MPEG-2 video. MPEG2Video UTType // MPEG4Audio: A type that represents an MPEG-4 audio layer file. MPEG4Audio UTType // MPEG4Movie: A type that represents an MPEG-4 movie. MPEG4Movie UTType // Makefile: A type that represents a Makefile. Makefile UTType // Message: A base type that represents a message. Message UTType // MountPoint: A type that represents a volume mount point. MountPoint UTType // Movie: A base type representing media formats that may contain both video and audio. Movie UTType // OSAScript: A type that represents an Open Scripting Architecture binary script. OSAScript UTType // OSAScriptBundle: A type that represents an Open Scripting Architecture script bundle. OSAScriptBundle UTType // ObjectiveCPlusPlusSource: A type that represents an Objective-C++ source code file. ObjectiveCPlusPlusSource UTType // ObjectiveCSource: A type that represents an Objective-C source code file. ObjectiveCSource UTType // PDF: A type that represents Adobe Portable Document Format (PDF) documents. PDF UTType // PHPScript: A type that represents a PHP script. PHPScript UTType // PKCS12: A type that represents Public Key Cryptography Standard (PKCS) 12 data. PKCS12 UTType // PNG: A type that represents a PNG image. PNG UTType // Package: A base type that represents a packaged directory. Package UTType // PerlScript: A type that represents a Perl script. PerlScript UTType // PlainText: A type that represents text with no markup and an unspecified encoding. PlainText UTType // Playlist: A base type that represents a playlist. Playlist UTType // PluginBundle: A base type that represents a bundle-based plug-in. PluginBundle UTType // Presentation: A base type that represents a presentation document. Presentation UTType // PropertyList: A base type that represents a property list. PropertyList UTType // PythonScript: A type that represents a Python script. PythonScript UTType // QuickLookGenerator: A type that represents a QuickLook preview generator bundle. QuickLookGenerator UTType // QuickTimeMovie: A type that represents a QuickTime movie. QuickTimeMovie UTType // RAWImage: A base type that represents a raw image format that you use in digital photography. RAWImage UTType // RTF: A type that represents Rich Text Format data. RTF UTType // RTFD: A type that represents Rich Text Format Directory documents. RTFD UTType // RealityFile: A type that represents a Reality Composer file. RealityFile UTType // Resolvable: A base type that represents a resolvable reference, including symbolic links and aliases. Resolvable UTType // RubyScript: A type that represents a Ruby script. RubyScript UTType // SVG: A type that represents a scalable vector graphics (SVG) image. SVG UTType // SceneKitScene: A type that represents a SceneKit serialized scene. SceneKitScene UTType // Script: A base type that represents any scripting language source. Script UTType // ShellScript: A base type that represents a shell script. ShellScript UTType // SourceCode: A base type that represents source code of any programming language. SourceCode UTType // SpotlightImporter: A type that represents a Spotlight metadata importer bundle. SpotlightImporter UTType // Spreadsheet: A base type that represents a spreadsheet document. Spreadsheet UTType // SwiftSource: A type that represents a Swift source code file. SwiftSource UTType // SymbolicLink: A type that represents a symbolic link. SymbolicLink UTType // SystemPreferencesPane: A type that represents a System Preferences pane. SystemPreferencesPane UTType // TIFF: A type that represents a TIFF image. TIFF UTType // TabSeparatedText: A type that represents text containing tab-separated values. TabSeparatedText UTType TarArchive UTType // Text: A base type that represents all text-encoded data, including text with markup. Text UTType // ToDoItem: A type that represents a to-do item. ToDoItem UTType // URL: A type that represents a URL. URL UTType // URLBookmarkData: A type that represents a URL bookmark. URLBookmarkData UTType // USD: A type that represents Universal Scene Description content. USD UTType // USDZ: A type that represents Universal Scene Description Package content. USDZ UTType // UTF16ExternalPlainText: A type that represents plain text encoded as UTF-16 with an optional BOM. UTF16ExternalPlainText UTType // UTF16PlainText: A type that represents plain text encoded as UTF-16 in native byte order with an optional bill of materials. UTF16PlainText UTType // UTF8PlainText: A type that represents plain text encoded as UTF-8. UTF8PlainText UTType // UTF8TabSeparatedText: A type that represents UTF-8–encoded text containing tab-separated values. UTF8TabSeparatedText UTType // UnixExecutable: A type that represents a UNIX executable. UnixExecutable UTType // VCard: A type that represents a vCard file. VCard UTType // Video: A type that represents video that doesn’t contain audio. Video UTType // Volume: A type that represents the root folder of a volume or mount point. Volume UTType // WAV: A type that represents data in Microsoft Waveform Audio File Format. WAV UTType // WebArchive: A type that represents WebKit web archive data. WebArchive UTType // WebP: A type that represents a WebP image. WebP UTType // X509Certificate: A type that represents an X.509 certificate. X509Certificate UTType // XML: A type that represents generic XML data. XML UTType // XMLPropertyList: A type that represents an XML property list. XMLPropertyList UTType // XPCService: A type that represents an XPC service bundle. XPCService UTType // YAML: A type that represents Yet Another Markup Language data. YAML UTType // ZIP: A type that represents a zip archive. ZIP UTType }
UTTypes provides typed accessors for UTType constants.
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 is a base type that represents 3D content. // // See: https://developer.apple.com/documentation/UniformTypeIdentifiers/UTType3DContent 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