Download an save an image file on HDD with Cocoa
Posted
by Julien
on Stack Overflow
See other posts from Stack Overflow
or by Julien
Published on 2010-05-27T15:54:17Z
Indexed on
2010/05/27
16:21 UTC
Read the original article
Hit count: 200
I'm building a program, and I'm quite confident using Objective-C, but I don't know how to programmatically download a file from the web and copy it on the hard drive. I started with :
NSString url = @"http://spiritofpolo.com/images/logo.png";
NSData* data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]];
But then I don't know what to do with the data... that sucks, no ;) Can somebody help?
© Stack Overflow or respective owner