Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
AsihttpRequest didfinishselector解压缩错误iOS_Ios_Objective C_Asihttprequest - Fatal编程技术网

AsihttpRequest didfinishselector解压缩错误iOS

AsihttpRequest didfinishselector解压缩错误iOS,ios,objective-c,asihttprequest,Ios,Objective C,Asihttprequest,您好,我正在从服务器下载一个大小为(100-200 MB)的epub文件 epub文件基本上是一个zip文件,扩展名为“.epub” 我用于下载文件的代码: __block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:TempBookUrl]]; bookZipPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDir

您好,我正在从服务器下载一个大小为(100-200 MB)的epub文件 epub文件基本上是一个zip文件,扩展名为“
.epub

我用于下载文件的代码:

__block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:TempBookUrl]];

     bookZipPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];

         NSString *tempStr = [bookZipPath stringByAppendingPathComponent:[NSString stringWithFormat:@"temp%@.epub",model.iD]];

            NSString *str = [bookZipPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.epub",model.iD]];

         [request setTemporaryFileDownloadPath:tempStr];

         [request setDownloadDestinationPath:str];

         [request setDidFinishSelector:@selector(processFile:)];

         [request setDidFailSelector:@selector(requestWentWrong:)];
         [request setDelegate:self];
         [request setAllowResumeForFileDownloads:YES];
         [request setShowAccurateProgress:YES];
         [request setDownloadProgressDelegate:self];
         [request setShouldContinueWhenAppEntersBackground:YES];

         [request startAsynchronous];
大量下载后,我得到了错误

表示无法解压缩文件,因为临时路径中不存在文件

错误:解压缩/Users/admin/Library/Application 支持/iPhone 模拟器/7.0/Applications/07322021-F878-41DA-A712-5C175C5252B6/Documents/temp27.epub

失败文件不存在


我正在使用iOS 7

您如何使用ASIHttpRequest?代码中不清楚。@ThomasW更新了POST。什么代码会出现此错误?
processFile:
code?
requestWentWrong:
被击中了吗?ASIHTTPRequest现在已被弃用。您应该转到AFNetworking或任何其他网络框架。