How to download files directly to disk on the iPhone os?

Posted by favo on Stack Overflow See other posts from Stack Overflow or by favo
Published on 2010-05-19T19:04:13Z Indexed on 2010/05/19 19:30 UTC
Read the original article Hit count: 224

Filed under:
|
|
|
|

Hi,

I would like to download files directly from an URL to the disk using objective-c on the iPhone os.

Currently I am using NSURLConnection to send a synchronousRequest, writing the returned NSData into a file.

How can I change the download handling (still having the request beeing synchronous, it is already in a background thread) to write the data directly to disk, not using memory variables to store the complete content (only small parts)?

A sample code would be appreciated.

Thank you all in advance for your responses!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c