Type Method

attachmentWithPlistObject:

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

Declaration

+ (instancetype)attachmentWithPlistObject:(id)object;

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

+ attachmentWithArchivableObject:

Creates an attachment from an object that conforms to NSSecureCoding.

+ attachmentWithArchivableObject:uniformTypeIdentifier:

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