SimpleFTPSampleを使用してファイルをアップロードしていますが、次の行に問題があります。
ftpStream = CFWriteStreamCreateWithFTPURL(NULL, (__bridge CFURLRef) urlOfHost);
assert(ftpStream != NULL);
常に NULL です。理由がわかりません。hostUrl は問題ありませんが、ftpStream には何も起こらず、アサートされます。
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);
}
誰かが知ることができますか?
よろしくお願いします。