Reputation: 817
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
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