Reputation: 436
I am interpreting a function onto my iOS App to attach an original data on the Email as a file. The app is a movie composer.
The data format is written as XML and I want the app to attach the data on the Email as the file with an original extension (.kpt). Besides, I want the receiver to open the received XML file using the movie composer.
The question is the following:
Upvotes: 0
Views: 1252
Reputation: 18477
How to setup an attachment:
MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init];
[mailController setSubject:@"Some Subject"];
[mailController addAttachmentData:data
mimeType:@"application/kpt"
fileName:@"originalFileName.kpt"];
In order to open the file inside your app, you will need to modify your Info.plist to describe a new document UTI. The programming guide for doing this can be found here.
Upvotes: 1