Is it possible to download a file from internet store it in document directory when an URL is given? I went through some documents in apple developer’s site. It said that its possible using NSURLDownload, but it cannot be used in iOS. So, it should be done by using NSURLConnection only in case of iOS. So, someone help me download a file(even the HTML page) from the given URL. Thanks in advance.
Share
Here’s an example of getting an image from a server and saving it to a file.
Create your instance variables
Now create your connection
Handle receiving data
Transfer finished, save the data
There are other bits of the code I’ve not shown (properties, etc), but this should give you enough to help, I think.