作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在邮件表中我可以添加图像,但我无法附加 vcard 文件
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker addAttachmentData:ExportVCF mimeType:@"text/x-vcard"
fileName:@ "JOHNSMITH.vcf"];
但是当我发送邮件时我没有收到附件
最佳答案
来自 MFMailCompserViewController 的文档:
The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be nil.
如果您查看该链接,您可以看到所有有效的 MIME 类型,并且 text/x-vcard
未列出。我认为这意味着邮件编辑器 View Controller 不允许您附加具有无效(在它看来)MIME 类型的文件。
关于iphone - 如何在 iPhone 应用程序的 Composer 表中添加 vcardfile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2200007/
我是一名优秀的程序员,十分优秀!