AsihttpRequest didfinishselector解压缩错误iOS

时间:2013-12-05 07:32:54

标签: ios objective-c asihttprequest

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

的zip文件

我用来下载文件的代码:

__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 /应用/ 07322021-F878-41DA-A712-5C175C5252B6 /文档/ temp27.epub

文件不存在失败

我正在使用iOS 7

0 个答案:

没有答案