iPhone Synchronous FTP
I am a beg开发者_StackOverflowinner. I tried to use some synchronous FTP downloading (in order to create a file on the iphone from a file on the ftp server) in an application but I am not able to do it. I read the doc (and CFTPSample) and I managed to use asynchronous download but not synchronous. Can anyone help me?
Cheers
Use NSData class:
NSString *myFile = @"ftp://domain.com/file.txt";
NSURL *url = [NSURL URLWithString:myFile];
NSData *mydata = [NSData dataWithContentsOfURL:url];
精彩评论