Initializer

init(plistObject:)

Creates an attachment from an object that can be represented in an XML property list.

Declaration

convenience init(plistObject object: Any)

Parameters

object

An object that can be serialized to an XML property list format, such as an array, dictionary, string, or date.

Discussion

The content of the attachment is an XML property list representation of the provided object with a uniformTypeIdentifier value of "com.apple.xml-property-list".

See Also

Creating Attachments from Objects

init(archivableObject: NSSecureCoding)

Creates an attachment from an object that conforms to NSSecureCoding.

init(archivableObject: NSSecureCoding, uniformTypeIdentifier: String)

Creates an attachment from an object that conforms to NSSecureCoding, with a custom UTI.