I have tried this:
NSURL *url = [NSURL URLWithString:ftpURL];
NSData *data = [NSData dataWithContentsOfURL:url];
if (data){
[data writeToFile:dataPath atomically:(YES)];
}
But it doesn't seem to work... I have initialised dataPath
, and ftpURL
elsewhere..I know they aren't null. And data
just returns null for some odd reason.
Does the above method support FTP download?
I have also searched on Google and StackOverflow regarding this and I couldn't find a solution that would help me. I saw SimpleFTPSample and I thought the above method was easier.