How to attach a PDF document (from the document catalog) to an email

I was wondering how to attach the PDF document that I created for email on iPhone / iPad. I found examples of how to attach an image, but I don't know the mime type for PDF.

Thanks.

+4
source share
2 answers

Use

[picker addAttachmentData:[NSData dataWithContentsOfFile:Your attachment file] mimeType:@"application/pdf" fileName:@"file name.pdf"]; 

Greetings

+4
source

MIME type for PDF must be application/pdf

0
source

Source: https://habr.com/ru/post/1336090/


All Articles