how to add .vcf file as attachment in application iphone
问题 In my app I want to add .vcf file as attachment in MFMailComposeViewController. 回答1: 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 The attachment is the actual vcf file loaded or transformed into NSData. The mimeType for a vcf is @"text/x-vcard" . The fileName is whatever you want to call it, though