Загрузить файл на FTP не работает в iOS

Я загружаю файл на FTP, используя эти классы.

Я использую этот метод для загрузки

- upload { //the upload request needs the input data to be NSData //so we first convert the image to NSData UIImage * ourImage = [UIImage imageNamed:@"space.jpg"]; NSData * ourImageData = UIImageJPEGRepresentation(ourImage, 100); //we create the upload request //we don't autorelease the object so that it will be around when the callback gets called //this is not a good practice, in real life development you should use a retain property to store a reference to the request WRRequestUpload * uploadImage = [[WRRequestUpload alloc] init]; uploadImage.delegate = self; //for anonymous login just leave the username and password nil uploadImage.hostname = @"xxx.xxx.xxx.xxx"; uploadImage.username = @"myuser"; uploadImage.password = @"mypass"; //we set our data uploadImage.sentData = ourImageData; //the path needs to be absolute to the FTP root folder. //full URL would be ftp://xxx.xxx.xxx.xxx/space.jpg uploadImage.path = @"/space.jpg"; //we start the request [uploadImage start]; } -(void) requestCompleted:(WRRequest *) request{ //called if 'request' is completed successfully NSLog(@"%@ completed!", request); } -(void) requestFailed:(WRRequest *) request{ //called after 'request' ends in error //we can print the error message NSLog(@"%@", request.error.message); } -(BOOL) shouldOverwriteFileWithRequest:(WRRequest *)request { //if the file (ftp://xxx.xxx.xxx.xxx/space.jpg) is already on the FTP server,the delegate is asked if the file should be overwritten //'request' is the request that intended to create the file return YES; } 

Но я не успешно загружаю файл по FTP. Также я не получаю никаких ошибок.

Итак, как загрузить файл по FTP?

Interesting Posts
Давайте будем гением компьютера.