Sunday, April 3, 2016

Objective C MIME Types for Docs for UIWebView

We can open downloaded documents in the UIWebView for displaying. To get the better display, we need to use the below MIME types while loading data in UIWebView.




                         


File TypeMIME Type
ppt/pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation
docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
docapplication/msword
rtfapplication/rtf
txttext/plain
aspxapplication/octet-stream
pdfapplication/pdf
imageimage/png, image/jpeg etc..



Hope this post is useful. Feel free to comment in case of any queries.