In my app I want to add .vcf file as attachment in MFMailComposeViewController.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- back button text does not change
相关文章
- 现在使用swift开发ios应用好还是swift?
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
Use the below code to create a vcf file and save it in directory.
The documentation for MFMailComposeViewController shows that its addAttachmentData:mimeType:fileName: instance method is the way to go:
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 you should uses the .vcf extension to ensure that email programs will understand it.