Coding was found here! Hi all. In objective C, I am trying to download a file from the net and save it, however I also a require a time stamp! dd'mm'yy format! Can anyone help?
N*SString*stringURL =@"http://www.somewhere.com/thefile.png";
NSURL *url =[NSURL URLWithString:stringURL];
NSData*urlData =[NSData dataWithContentsOfURL:url];
if( urlData )
{
NSArray *paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSString *documentsDirectory =[paths objectAtIndex:0];
NSString *filePath =[NSString stringWithFormat:@"%@/%@", documentsDirectory,@"filename.png"];
[urlData writeToFile:filePath atomically:YES];
}*