如何在应用程序iphone中将.vcf文件添加为附件

编程入门 行业动态 更新时间:2024-10-28 22:28:22
本文介绍了如何在应用程序iphone中将.vcf文件添加为附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在我的应用中,我想将.vcf文件作为附件添加到MFMailComposeViewController中.

In my app I want to add .vcf file as attachment in MFMailComposeViewController.

推荐答案

文档显示,其 addAttachmentData:mimeType:fileName:实例方法是解决方法:

The documentation for MFMailComposeViewController shows that its addAttachmentData:mimeType:fileName: instance method is the way to go:

- (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename

附件是实际的vcf文件,已加载或转换为NSData.

The attachment is the actual vcf file loaded or transformed into NSData.

vcf的 mimeType 是 @"text/x-vcard" .

fileName 是您想要的名称,尽管您应该使用.vcf扩展名来确保电子邮件程序能够理解它.

The fileName is whatever you want to call it, though you should uses the .vcf extension to ensure that email programs will understand it.

更多推荐

如何在应用程序iphone中将.vcf文件添加为附件

本文发布于:2023-11-15 17:39:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1596576.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中将   应用程序   附件   文件   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!