views:

235

answers:

1

In a new app, I plan to let users download their own files and stored them inside iPhone. The process is typically:

  • iPhone present a web page by UIWebView, in which there are several links to .zip files
  • the user browser the page and click on one of the .zip file link
  • iPhone downloads the file into the iPhone document folder, closes WebView, acknowledges the user when download is complete

How can that be done? Thanks

+1  A: 

You'll need to handle the click of the link yourself by capturing the request on your UIWebViewDelegate implementation, and then downloading the file with NSURLRequest asynchronously. This question is essentially the same thing at that point. If you want to unzip, have a look at this question.

slf