1
Я использую SimpleFTPSample для загрузки файлов, но у меня есть проблема с линией:загрузки файла на FTP - IOS
ftpStream = CFWriteStreamCreateWithFTPURL(NULL, (__bridge CFURLRef) urlOfHost);
assert(ftpStream != NULL);
Он всегда NULL, я не знаю, почему? hostUrl в порядке, но ничего не происходит с ftpStream, и я получаю assert.
URL:
urlOfHost = [[AppDelegate sharedAppDelegate] smartURLForString:[NSString stringWithFormat: @"ftp://wd150.1host.co.il/%@", orderKey]];
success = (urlOfHost != nil);
if (success) {
// Add the last part of the file name to the end of the URL to form the final
// URL that we're going to put to.
urlOfHost = CFBridgingRelease(CFURLCreateCopyAppendingPathComponent(NULL, (__bridge CFURLRef) url, (__bridge CFStringRef) [filePath lastPathComponent], false)
);
NSLog (@"%@", [urlOfHost description]);
success = (urlOfHost != nil);
}
Может кто-нибудь знает?
Thank's from advance.
Покажите нам, как вы создаете свой 'urlOfHost'. – trojanfoe
Я редактирую свой вопрос. благодаря – Segev