I am having an app in which I am opening a PDF file from a url.
I am successfully able to open it in a webView.
Now I want to download that PDF file and sa
If convert to string server response, that you got in NSData *pdfData, you will see next:
iOS Developer Library
This only web page, which, as I can assume, will forward you to document with another URI:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/UIWebView_Class.pdf. So you must use this url if you want to download .pdf file
Also, pay attention on @pawan's answer, and use his approach to avoid download files in main thread