In my ios app user can send the pdf file as an attachment to some other. It was working on pre ios 7 devices. After upgraded to ios 7 the attachment was missing when app presents the ios mail interface.
Here the code i used to set the mime type:
[mailComposer addAttachmentData:pdfData mimeType:@"application/octet-stream" fileName:fileName];
The above mime type works great on pre ios 7 but on ios 7 it was not taking my file as an attachment. So, i changed the mime type like this:
[mailComposer addAttachmentData:pdfData mimeType:@"application/pdf" fileName:fileName];
It was working fine on ios 7 and pre ios 7 devices but the problem was,On iPad if the attached pdf file has single page then it treated as inline image instead of an attachment. This is happening onnly on iPad on iPhone its fine. Also if i send that mail to some one, On the recipient side also it shows like an inline image when they open that mail on iphone or ipad. since when they tap it it allows two option 1. save image 2. cancel. Also this issue not about ios 7 ipad devices this is happening on all ipad devices which was running under ios 5, ios 6, ios 6.1 and ios 7. Any idea how to resolve it?. What mime type should i use for this to resolve it?.
Note:- for more info please check the attached screenshot
-loganathan
I have same problem with single page PDF. Just change mimeType to text/pdf instead of application/pdf and it's works.No further change required.
I sometimes have the same issue with mail.app on OSX and have compressed the file into a zip file as a workaround. Perhaps that is an option?
Use plain text message body, the pdf will shows as normal file attachment.