The Uniform Type Identifier (UTI) of the data represented by the attachment.
- Xcode 9.0+
Uniform Type Identifiers (UTIs) are Apple-defined identifiers that uniquely identify a particular type of data, such as a JPEG image or text document. Every
XCTAttachment instance stores a UTI string that indicates the type of data represented by the attachment.
When you create an attachment with an
XCTAttachment convenience initializer such as
init(plist, XCTest determines an appropriate UTI to use for the provided data. See each convenience initializer for more information about the UTIs it uses.
Where possible, you should use the
XCTAttachment convenience initializers to create attachments for known data types. If you need to create an attachment with a manually specified UTI (such as for a custom data format used by your app), use one of the following initializers instead:
init(contentsfor reading the contents of a file with a known custom UTI
Of File: uniform Type Identifier:)
init(data:for data stored in memory with a known custom UTI
uniform Type Identifier:)
init(uniformfor a data payload with a custom UTI, name, and user info dictionary
Type Identifier: name: payload: user Info:)