我在下面这个链接的堆栈溢出中找到了一个很好的答案
download and unzip file in iOS
请检查下面
我已经用过
ZipArchive
在过去取得了成功。它非常轻巧,使用简单,支持密码保护,一个zip中有多个文件,以及压缩和解压缩。
基本用法是:
NSString *filepath = [[NSBundle mainBundle] pathForResource:@"ZipFileName" ofType:@"zip"];
ZipArchive *zipArchive = [[ZipArchive alloc] init];
[zipArchive UnzipOpenFile:filepath Password:@"xxxxxx"];
[zipArchive UnzipFileTo:{pathToDirectory} overWrite:YES];
[zipArchive UnzipCloseFile];
[zipArchive release];
有关此包的更多示例
here
我也试过
SSZipArchive
在一些项目中。
下面一行将解压缩您的zip文件。
[SSZipArchive unzipFileAtPath:path toDestination:destination];