我正在开发典型的报摊应用程序,并且解压缩下载的文件时遇到问题。xcode解压缩下载问题
-(void)connectionDidFinishDownloading:(NSURLConnection *)connection destinationURL:(NSURL *)destinationURL {
// copy the file to the destination directory
NSURL *finalURL = [[self contentURL] URLByAppendingPathComponent:@"magazine.zip"]; ELog(@"Copying item from %@ to %@",destinationURL,finalURL);
[[NSFileManager defaultManager] copyItemAtURL:destinationURL toURL:finalURL error:NULL]; [[NSFileManager defaultManager] removeItemAtURL:destinationURL error:NULL];
// Downloaded file magazine.zip is in finalURL now and in next step I will try to unzip it
[SSZipArchive unzipFileAth:[finalURL path] toDestinan:[[self contentURL]path] overwrite:YES password:nil error:nil];
[self sendEndOfDownloadNotification]; }
没有任何反应。我检查了该文件是否确实位于finalURL路径中,是的。 SSZipArchive有问题打开magazine.zip文件。我试图找到一些例子,如何解压下载的Newsstand问题,但我没有找到任何东西。