ZipArchive is a simple utility class for zipping and unzipping files on iOS, macOS and tvOS.
The main release branch is configured to support Objective-C and Swift 3+.
SSZipArchive works on Xcode 7-11 and above, iOS 9-13 and above, tvOS 9 and above, macOS 10.8-10.15 and above, watchOS 2 and above.
In your Podfile:
pod 'SSZipArchive'
You should define your minimum deployment target explicitly, like:
platform :ios, '9.0'
Recommended CocoaPods version should be at least CocoaPods 1.7.5.
In your Cartfile:
github "ZipArchive/ZipArchive"
SSZipArchive
and minizip
folders to your project.libz
and libiconv
libraries to your target.Security
framework to your target.HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB $(inherited)
.SSZipArchive requires ARC.
// Create
[SSZipArchive createZipFileAtPath:zipPath withContentsOfDirectory:sampleDataPath];
// Unzip
[SSZipArchive unzipFileAtPath:zipPath toDestination:unzipPath];
// Create
SSZipArchive.createZipFileAtPath(zipPath, withContentsOfDirectory: sampleDataPath)
// Unzip
SSZipArchive.unzipFileAtPath(zipPath, toDestination: unzipPath)
SSZipArchive is protected under the MIT license and our slightly modified version of Minizip 1.2 is licensed under the Zlib license.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。