I have tried to install SSZipArchive using Cocoapods, without success. I have several questions, and tried all solutions I found on StackOverflow to solve.
How to install SSZipArchive (or any other framework), without link error?
Try This.
If you have already tried and fail to have proper file then do this, Remove line pod 'SSZipArchive' from Pod file and run "pod install", it will remove previously stored buggy files.
Now your Pod file should be like below :
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'ZIpArchive' do
pod 'SSZipArchive'
end
Run pod install
open your project.xcworkspace
, Where ever you want to use SSZiparchive methods.
In Objective-C
use "#import "ZipArchive.h"
Then after you can use the class methods of SSZipArchive like this.
[SSZipArchive createZipFileAtPath:@"" withContentsOfDirectory:@"" withPassword:@""];
In Swift
import SSZipArchive
Then after you can use class method like this
SSZipArchive.createZipFileAtPath("", withContentsOfDirectory: "")