1
我用SimpleFTPSample上传文件,但我有问题,线:上传文件到FTP - iOS设备
ftpStream = CFWriteStreamCreateWithFTPURL(NULL, (__bridge CFURLRef) urlOfHost);
assert(ftpStream != NULL);
它总是NULL,我不知道为什么? hostUrl是好的,但没有发生ftpStream,我得到断言。
网址:
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);
}
有人能知道吗?
从预先感谢。
向我们展示如何创建你的'urlOfHost'。 – trojanfoe
我编辑我的问题。谢谢 – Segev