ash84
ash84

Reputation: 817

what is mimetype of plist in addAttachmentData()?

I want to make the backup & restore.

so I use mail and want to .plist file in document.

but i don't know mimetype of plist.

[mail_controller addAttachmentData:myData mimeType:@"text/xml" fileName:filename];

I use text/xml as mimetype. But i received mail and the attacted plist does not have file extension. help me

Upvotes: 4

Views: 3186

Answers (1)

Ric Santos
Ric Santos

Reputation: 16447

For the mime type, use application/xml or application/x-plist, depending on if you encoded your plist as XML or binary.

For the extension, make sure your fileName variable includes the extension.

Example:

NSString *fileName = @"MyFile.plist"
[mail_controller addAttachmentData:myData mimeType:@"application/xml" fileName:filename];

Upvotes: 8

Related Questions