Unknown mimetype MFMailComposerViewController

In my application a document file is downloading from the server and it is attaching to the MFMailcomposeViewOntroller but the document may be .pdf/.doc/.docx/.txt/.excel etc my problem is how to set the attachment mime ttype im mailcomposer?

Apple doc sayes mime type must not be nil How can I solve this


Take a look at the class reference for the MFMailComposerViewController, especially the method addAttachmentData:mimeType:fileName: .

http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html

Check this post on how to get the mime type based on the extension of a file: How Can I get Mime Type in IOS which is not based on extension

链接地址: http://www.djcxy.com/p/45540.html

上一篇: 验证doc docx类型文件时出现laravel 5.1错误

下一篇: 未知的mimetype MFMailComposerViewController