Cleanup Readme and podfile
This commit is contained in:
@@ -7,8 +7,9 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <ZipArchive/Main.h>
|
||||
|
||||
@interface ViewController : UIViewController
|
||||
@interface ViewController : UIViewController <ZipArchiveDelegate>
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -16,12 +16,25 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
// Unzip Operation
|
||||
NSString *zipPath = @"path_to_your_zip_file";
|
||||
NSString *destinationPath = @"path_to_the_folder_where_you_want_it_unzipped";
|
||||
|
||||
[Main unzipFileAtPath:zipPath
|
||||
toDestination:destinationPath];
|
||||
|
||||
// Zip Operation
|
||||
NSString *zippedPath = @"path_where_you_want_the_file_created";
|
||||
NSArray *inputPaths = @[[[NSBundle mainBundle] pathForResource:@"photo1" ofType:@"jpg"],
|
||||
[[NSBundle mainBundle] pathForResource:@"photo1" ofType:@"jpg"]];
|
||||
|
||||
[Main createZipFileAtPath:zippedPath
|
||||
withFilesAtPaths:inputPaths];
|
||||
|
||||
// Zip Directory
|
||||
[Main createZipFileAtPath:zippedPath
|
||||
withContentsOfDirectory:inputPaths];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -2,15 +2,6 @@
|
||||
|
||||
ZipArchive is a simple utility class for zipping and unzipping files.
|
||||
|
||||
You can do the following:
|
||||
|
||||
- Unzip zip files
|
||||
- Unzip password protected zip files
|
||||
- Create new zip files
|
||||
- Append to existing zip files
|
||||
- Zip files
|
||||
- Zip-up `NSData` instances (with a filename)
|
||||
|
||||
##How to add ZipArchive to your project
|
||||
|
||||
1. Add the `SSZipArchive` and `minizip` folders to your project.
|
||||
@@ -21,25 +12,25 @@ ZipArchive requires ARC.
|
||||
###Usage
|
||||
|
||||
```objective-c
|
||||
// Unzipping
|
||||
NSString *zipPath = @"path_to_your_zip_file";
|
||||
NSString *destinationPath = @"path_to_the_folder_where_you_want_it_unzipped";
|
||||
[SSZipArchive unzipFileAtPath:zipPath toDestination:destinationPath];
|
||||
|
||||
// Zipping
|
||||
NSString *zippedPath = @"path_where_you_want_the_file_created";
|
||||
NSArray *inputPaths = [NSArray arrayWithObjects:
|
||||
[[NSBundle mainBundle] pathForResource:@"photo1" ofType:@"jpg"],
|
||||
[[NSBundle mainBundle] pathForResource:@"photo2" ofType:@"jpg"]
|
||||
nil];
|
||||
[SSZipArchive createZipFileAtPath:zippedPath withFilesAtPaths:inputPaths];
|
||||
|
||||
// Zipping directory
|
||||
[SSZipArchive createZipFileAtPath:zippedPath withContentsOfDirectory:inputPath];
|
||||
// Unzip Operation
|
||||
NSString *zipPath = @"path_to_your_zip_file";
|
||||
NSString *destinationPath = @"path_to_the_folder_where_you_want_it_unzipped";
|
||||
|
||||
[Main unzipFileAtPath:zipPath
|
||||
toDestination:destinationPath];
|
||||
|
||||
// Zip Operation
|
||||
NSString *zippedPath = @"path_where_you_want_the_file_created";
|
||||
NSArray *inputPaths = @[[[NSBundle mainBundle] pathForResource:@"photo1" ofType:@"jpg"],
|
||||
[[NSBundle mainBundle] pathForResource:@"photo1" ofType:@"jpg"]];
|
||||
|
||||
[Main createZipFileAtPath:zippedPath
|
||||
withFilesAtPaths:inputPaths];
|
||||
|
||||
// Zip Directory
|
||||
[Main createZipFileAtPath:zippedPath
|
||||
withContentsOfDirectory:inputPaths];
|
||||
```
|
||||
|
||||
###Licensing
|
||||
ZipArchive is protected under the [MIT license](https://github.com/ZipArchive/ZipArchive/raw/master/LICENSE) and our slightly modified version of [Minizip](http://www.winimage.com/zLibDll/minizip.html) 1.1 is licensed under the [Zlib license](http://www.zlib.net/zlib_license.html).
|
||||
|
||||
## Acknowledgments
|
||||
Big thanks to [Aish](http://code.google.com/p/ziparchive) for creating [ZipArchive](http://code.google.com/p/ziparchive). The project that inspired ZipArchive. Thank you [@randomsequence](https://github.com/randomsequence) for implementing the creation support tech and to [@johnezang](https://github.com/johnezang) for all his amazing help along the way.
|
||||
ZipArchive is released under the [MIT license](https://github.com/ZipArchive/ZipArchive/raw/master/LICENSE) and our slightly modified version of [Minizip](http://www.winimage.com/zLibDll/minizip.html) 1.1 is licensed under the [Zlib license](http://www.zlib.net/zlib_license.html).
|
||||
@@ -1,15 +0,0 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'SSZipArchive'
|
||||
s.version = '0.3.2'
|
||||
s.summary = 'Utility class for zipping and unzipping files on iOS and Mac.'
|
||||
s.description = 'SSZipArchive is a simple utility class for zipping and unzipping files on iOS and Mac.'
|
||||
s.homepage = 'https://github.com/soffes/ssziparchive'
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE.txt' }
|
||||
s.author = { 'Sam Soffes' => 'sam@soff.es' }
|
||||
s.source = { :git => 'https://github.com/soffes/ssziparchive.git', :tag => "v#{s.version}" }
|
||||
s.ios.deployment_target = '4.0'
|
||||
s.osx.deployment_target = '10.6'
|
||||
s.source_files = 'SSZipArchive/*', 'SSZipArchive/minizip/*'
|
||||
s.library = 'z'
|
||||
s.requires_arc = true
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'ZipArchive'
|
||||
s.version = '2.0'
|
||||
s.summary = 'Utility class for zipping and unzipping files on iOS and Mac.'
|
||||
s.description = 'ZipArchive is a simple utility class for zipping and unzipping files on iOS and Mac.'
|
||||
s.homepage = 'https://github.com/ZipArchive/ZipArchive'
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE.txt' }
|
||||
s.author = { 'Sam Soffes' => 'sam@soff.es' }
|
||||
s.source = { :git => 'https://github.com/ZipArchive/ZipArchive.git', :tag => "v#{s.version}" }
|
||||
s.ios.deployment_target = '4.0'
|
||||
s.osx.deployment_target = '10.6'
|
||||
s.source_files = 'ZipArchive/*', 'ZipArchive/minizip/*'
|
||||
s.library = 'z'
|
||||
s.requires_arc = true
|
||||
end
|
||||
@@ -28,6 +28,7 @@
|
||||
A527EDD41B52806D00CA3DAF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A527EDD31B52806D00CA3DAF /* libz.dylib */; };
|
||||
A527EDD91B52809700CA3DAF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A527EDD71B52808900CA3DAF /* Foundation.framework */; };
|
||||
A527EDDA1B52809700CA3DAF /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A527EDD51B52808400CA3DAF /* CoreGraphics.framework */; };
|
||||
A53101811B5284E200FA26EA /* Main.h in Headers */ = {isa = PBXBuildFile; fileRef = A5D15D181B51A4D000929105 /* Main.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A5D15CC31B51A38C00929105 /* ZipArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = A5D15CC21B51A38C00929105 /* ZipArchive.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A5D15CC91B51A38C00929105 /* ZipArchive.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5D15CBD1B51A38C00929105 /* ZipArchive.framework */; };
|
||||
A5D15CD01B51A38C00929105 /* ZipArchiveTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A5D15CCF1B51A38C00929105 /* ZipArchiveTests.m */; };
|
||||
@@ -300,6 +301,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A5D15CC31B51A38C00929105 /* ZipArchive.h in Headers */,
|
||||
A53101811B5284E200FA26EA /* Main.h in Headers */,
|
||||
A527EDC11B527FD000CA3DAF /* crypt.h in Headers */,
|
||||
A527EDC21B527FD000CA3DAF /* ioapi.c in Headers */,
|
||||
A527EDC31B527FD000CA3DAF /* ioapi.h in Headers */,
|
||||
|
||||
@@ -14,4 +14,6 @@ FOUNDATION_EXPORT double ZipArchiveVersionNumber;
|
||||
//! Project version string for ZipArchive.
|
||||
FOUNDATION_EXPORT const unsigned char ZipArchiveVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <ZipArchive/PublicHeader.h>
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <ZipArchive/PublicHeader.h>
|
||||
|
||||
#import <ZipArchive/Main.h>
|
||||
Reference in New Issue
Block a user