18 Commits
v1.1 ... v1.2

Author SHA1 Message Date
Joshua Hudson
1329746e00 Bump podspec to 1.2 2016-05-11 21:59:42 -07:00
Joshua Hudson
41c3e8251f Moved method to private section. 2016-05-11 21:51:06 -07:00
Joshua Hudson
6662e376d3 Merge pull request #250 from bogo/fix-writing-insitu
Create the .DS_Store files in temp directory for read-only contexts
2016-05-11 21:42:30 -07:00
Bogo Giertler
c17e76ceb8 Create the .DS_Store files in temp directory for read-only contexts 2016-05-11 16:39:08 +01:00
Joshua Hudson
7b1b69ac63 Merge pull request #247 from jasdeepsaini/watchos_support_in_podspec
Added support for watchos to the podspec.
2016-04-06 11:45:06 -07:00
Jasdeep Saini
dd704514ed Updated the summary and description for the podspec to include watchOS. 2016-04-05 22:57:26 -05:00
Jasdeep Saini
c1af3293ed Added support for watchos to the podspec. 2016-04-05 22:25:05 -05:00
Joshua Hudson
8c51a6838f Fix #239 2016-03-23 16:54:24 -07:00
Joshua Hudson
4f81669eff Merge pull request #243 from evenlyio/tvos_support
tvOS support - Thanks!
2016-03-23 16:43:37 -07:00
Thomas Heß
767240fa71 Revert "bumped version number"
This reverts commit a595d64d12.
2016-03-23 09:27:06 +01:00
Thomas Heß
a595d64d12 bumped version number 2016-03-23 09:24:46 +01:00
Thomas Heß
bf55f841df added tvOS deployment target 2016-03-23 09:24:32 +01:00
Joshua Hudson
d16ce77f91 Merge pull request #237 from ClementPadovani/master
Fixes broken commit
2016-02-24 06:03:25 -08:00
ClementPadovani
4f526ae0c5 Merge pull request #1 from ClementPadovani/ClementPadovani-patch-1
Removed getters since they broke everything.
2016-02-24 14:55:11 +01:00
ClementPadovani
8ba930ef4b Removed getters since they broke everything.
Reverts this commit 03f70718a2 that broke the opening and closing of zip files as mentioned in https://github.com/ZipArchive/ZipArchive/issues/225
2016-02-24 14:54:39 +01:00
Joshua Hudson
e9313bf5c1 Update Release Instructions 2016-01-27 11:38:19 -08:00
Joshua Hudson
5a936a726a Create Release Instructions
I always forget all the steps. Especially now that we have cocoa pods and Carthage
2016-01-27 11:37:32 -08:00
Joshua Hudson
b89bc45c57 Fix podspec, it would not validate for OSX part of validation. See comment by @krzyzanowskim at https://github.com/CocoaPods/CocoaPods/issues/3638 2016-01-27 09:38:00 -08:00
6 changed files with 98 additions and 58 deletions

View File

@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
60F2CD131F797840FEEF41BF /* Pods_ObjectiveCExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E647562E4F5D61128404422A /* Pods_ObjectiveCExample.framework */; };
8DFE19EF1BDA9FF300709011 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE19EE1BDA9FF300709011 /* main.m */; };
8DFE19F21BDA9FF300709011 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE19F11BDA9FF300709011 /* AppDelegate.m */; };
8DFE19F51BDA9FF300709011 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE19F41BDA9FF300709011 /* ViewController.m */; };
@@ -31,7 +32,6 @@
8DFE1A341BDAA10100709011 /* 5.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A241BDAA10100709011 /* 5.m4a */; };
8DFE1A351BDAA10100709011 /* 6.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A251BDAA10100709011 /* 6.m4a */; };
8DFE1A361BDAA10100709011 /* 7.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A261BDAA10100709011 /* 7.m4a */; };
BC14D61B16F6F9821E1D2AF8 /* Pods_ObjectiveCExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55A83C5BCB33C184EAB6A4E4 /* Pods_ObjectiveCExample.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -45,8 +45,7 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
1D19A4CE2C2507826BBF65B2 /* Pods-ObjectiveCExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ObjectiveCExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample.debug.xcconfig"; sourceTree = "<group>"; };
55A83C5BCB33C184EAB6A4E4 /* Pods_ObjectiveCExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ObjectiveCExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
78F9C8623D65380774875E92 /* Pods-ObjectiveCExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ObjectiveCExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample.debug.xcconfig"; sourceTree = "<group>"; };
8DFE19EA1BDA9FF300709011 /* ObjectiveCExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ObjectiveCExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
8DFE19EE1BDA9FF300709011 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8DFE19F01BDA9FF300709011 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@@ -78,7 +77,8 @@
8DFE1A241BDAA10100709011 /* 5.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = 5.m4a; sourceTree = "<group>"; };
8DFE1A251BDAA10100709011 /* 6.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = 6.m4a; sourceTree = "<group>"; };
8DFE1A261BDAA10100709011 /* 7.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = 7.m4a; sourceTree = "<group>"; };
D8928CF7ED12679FE72CDF96 /* Pods-ObjectiveCExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ObjectiveCExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample.release.xcconfig"; sourceTree = "<group>"; };
BF4E88C3450A127B14A949C2 /* Pods-ObjectiveCExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ObjectiveCExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample.release.xcconfig"; sourceTree = "<group>"; };
E647562E4F5D61128404422A /* Pods_ObjectiveCExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ObjectiveCExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -86,7 +86,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BC14D61B16F6F9821E1D2AF8 /* Pods_ObjectiveCExample.framework in Frameworks */,
60F2CD131F797840FEEF41BF /* Pods_ObjectiveCExample.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -100,14 +100,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
133E0B9323A7D3A1E738A45C /* Pods */ = {
isa = PBXGroup;
children = (
78F9C8623D65380774875E92 /* Pods-ObjectiveCExample.debug.xcconfig */,
BF4E88C3450A127B14A949C2 /* Pods-ObjectiveCExample.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
8DFE19E11BDA9FF300709011 = {
isa = PBXGroup;
children = (
8DFE19EC1BDA9FF300709011 /* ObjectiveCExample */,
8DFE1A061BDA9FF300709011 /* ObjectiveCExampleTests */,
8DFE19EB1BDA9FF300709011 /* Products */,
BCB342A5EC26DB692D25F7D4 /* Pods */,
9DAA2CA8E954AC9481CC795C /* Frameworks */,
133E0B9323A7D3A1E738A45C /* Pods */,
C0E3885084B2150B8F297B76 /* Frameworks */,
);
sourceTree = "<group>";
};
@@ -187,23 +196,14 @@
path = Multi_Zip_Test;
sourceTree = "<group>";
};
9DAA2CA8E954AC9481CC795C /* Frameworks */ = {
C0E3885084B2150B8F297B76 /* Frameworks */ = {
isa = PBXGroup;
children = (
55A83C5BCB33C184EAB6A4E4 /* Pods_ObjectiveCExample.framework */,
E647562E4F5D61128404422A /* Pods_ObjectiveCExample.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
BCB342A5EC26DB692D25F7D4 /* Pods */ = {
isa = PBXGroup;
children = (
1D19A4CE2C2507826BBF65B2 /* Pods-ObjectiveCExample.debug.xcconfig */,
D8928CF7ED12679FE72CDF96 /* Pods-ObjectiveCExample.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -211,12 +211,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 8DFE1A0C1BDA9FF300709011 /* Build configuration list for PBXNativeTarget "ObjectiveCExample" */;
buildPhases = (
9DD791BB0AF1B25DAC39CA6E /* Check Pods Manifest.lock */,
B17DD0CEF4553EDB98836D32 /* Check Pods Manifest.lock */,
8DFE19E61BDA9FF300709011 /* Sources */,
8DFE19E71BDA9FF300709011 /* Frameworks */,
8DFE19E81BDA9FF300709011 /* Resources */,
46297D8971768D8719ECE6DF /* Embed Pods Frameworks */,
2CFF892408F7E8BF9EC5C1C5 /* Copy Pods Resources */,
CA0F9A9BDCCC5F900FD55CF3 /* Embed Pods Frameworks */,
8328CABE589F0AEC0D43D7CC /* Copy Pods Resources */,
);
buildRules = (
);
@@ -318,7 +318,7 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
2CFF892408F7E8BF9EC5C1C5 /* Copy Pods Resources */ = {
8328CABE589F0AEC0D43D7CC /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -333,22 +333,7 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample-resources.sh\"\n";
showEnvVarsInLog = 0;
};
46297D8971768D8719ECE6DF /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9DD791BB0AF1B25DAC39CA6E /* Check Pods Manifest.lock */ = {
B17DD0CEF4553EDB98836D32 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -363,6 +348,21 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
CA0F9A9BDCCC5F900FD55CF3 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -499,7 +499,7 @@
};
8DFE1A0D1BDA9FF300709011 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1D19A4CE2C2507826BBF65B2 /* Pods-ObjectiveCExample.debug.xcconfig */;
baseConfigurationReference = 78F9C8623D65380774875E92 /* Pods-ObjectiveCExample.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = ObjectiveCExample/Info.plist;
@@ -511,7 +511,7 @@
};
8DFE1A0E1BDA9FF300709011 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D8928CF7ED12679FE72CDF96 /* Pods-ObjectiveCExample.release.xcconfig */;
baseConfigurationReference = BF4E88C3450A127B14A949C2 /* Pods-ObjectiveCExample.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = ObjectiveCExample/Info.plist;

View File

@@ -1,14 +1,16 @@
PODS:
- SSZipArchive (1.0.1)
- SSZipArchive (1.1)
DEPENDENCIES:
- SSZipArchive (from `..`)
EXTERNAL SOURCES:
SSZipArchive:
:path: ..
:path: ".."
SPEC CHECKSUMS:
SSZipArchive: 7bfebbf578e47e1c4239a06f0c202101d4d933ab
SSZipArchive: 764254a5927195a5e7caea30cdc1afd3ea6732c5
COCOAPODS: 0.39.0
PODFILE CHECKSUM: f060f800d651f1416cf88d195123f53e9462d745
COCOAPODS: 1.0.0.beta.2

20
Release-Instructions.md Normal file
View File

@@ -0,0 +1,20 @@
The following steps should be taking by project maintainers if they create a new release.
1. Create a new release and tag for the release.
- Tags should be in the form of vMajor.Minor.Revision
- Release names should be more human readable: Version Major.Minor.Revision
2. Update the podspec
3. Push the pod to the trunk
- *pod trunk push SSZipArchive.podspec*
4. Create a Carthage framework archive
- *carthage build --no-skip-current*
- *carthage archive ZipArchive*
5. Attach archive to the release created in step 1.

View File

@@ -1,15 +1,17 @@
Pod::Spec.new do |s|
s.name = 'SSZipArchive'
s.version = '1.1'
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.version = '1.2'
s.summary = 'Utility class for zipping and unzipping files on iOS, tvOS, watchOS, and Mac.'
s.description = 'SSZipArchive is a simple utility class for zipping and unzipping files on iOS, tvOS, watchOS, 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.tvos.deployment_target = '9.0'
s.osx.deployment_target = '10.6'
s.source_files = 'SSZipArchive/*', 'SSZipArchive/minizip/*', 'SSZipArchive/aes/*'
s.watchos.deployment_target = '2.0'
s.source_files = 'SSZipArchive/*.m', 'SSZipArchive/*.h', 'SSZipArchive/minizip/*', 'SSZipArchive/aes/*'
s.public_header_files = 'SSZipArchive/*.h'
s.library = 'z'
s.requires_arc = true

View File

@@ -48,12 +48,12 @@
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(NSString *)password;
- (instancetype)initWithPath:(NSString *)path;
@property (NS_NONATOMIC_IOSONLY, readonly, getter = isOpen) BOOL open;
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL open;
- (BOOL)writeFile:(NSString *)path withPassword:(NSString *)password;
- (BOOL)writeFolderAtPath:(NSString *)path withFolderName:(NSString *)folderName withPassword:(NSString *)password;
- (BOOL)writeFileAtPath:(NSString *)path withFileName:(NSString *)fileName withPassword:(NSString *)password;
- (BOOL)writeData:(NSData *)data filename:(NSString *)filename withPassword:(NSString *)password;
@property (NS_NONATOMIC_IOSONLY, readonly, getter = isClosed) BOOL close;
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL close;
@end

View File

@@ -444,21 +444,22 @@
BOOL isDir;
NSString *fullFilePath = [directoryPath stringByAppendingPathComponent:fileName];
[fileManager fileExistsAtPath:fullFilePath isDirectory:&isDir];
if (keepParentDirectory)
{
fileName = [[directoryPath lastPathComponent] stringByAppendingPathComponent:fileName];
}
if (!isDir) {
if (keepParentDirectory)
{
fileName = [[directoryPath lastPathComponent] stringByAppendingPathComponent:fileName];
}
[zipArchive writeFileAtPath:fullFilePath withFileName:fileName withPassword:password];
}
else
{
if([[NSFileManager defaultManager] subpathsOfDirectoryAtPath:fullFilePath error:nil].count == 0)
{
NSString *tempName = [fullFilePath stringByAppendingPathComponent:@".DS_Store"];
[@"" writeToFile:tempName atomically:YES encoding:NSUTF8StringEncoding error:nil];
[zipArchive writeFileAtPath:tempName withFileName:[fileName stringByAppendingPathComponent:@".DS_Store"] withPassword:password];
[[NSFileManager defaultManager] removeItemAtPath:tempName error:nil];
NSString *tempFilePath = [self _temporaryPathForDiscardableFile];
NSString *tempFileFilename = [fileName stringByAppendingPathComponent:tempFilePath.lastPathComponent];
[zipArchive writeFileAtPath:tempFilePath withFileName:tempFileFilename withPassword:password];
}
}
}
@@ -662,6 +663,21 @@
#pragma mark - Private
+ (NSString *)_temporaryPathForDiscardableFile
{
static NSString *discardableFileName = @".DS_Store";
static NSString *discardableFilePath = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *temporaryDirectoryName = [[NSUUID UUID] UUIDString];
NSString *temporaryDirectory = [NSTemporaryDirectory() stringByAppendingPathComponent:temporaryDirectoryName];
BOOL directoryCreated = [[NSFileManager defaultManager] createDirectoryAtPath:temporaryDirectory withIntermediateDirectories:YES attributes:nil error:nil];
discardableFilePath = directoryCreated ? [temporaryDirectory stringByAppendingPathComponent:discardableFileName] : nil;
[@"" writeToFile:discardableFilePath atomically:YES encoding:NSUTF8StringEncoding error:nil];
});
return discardableFilePath;
}
// Format from http://newsgroups.derkeiler.com/Archive/Comp/comp.os.msdos.programmer/2009-04/msg00060.html
// Two consecutive words, or a longword, YYYYYYYMMMMDDDDD hhhhhmmmmmmsssss
// YYYYYYY is years from 1980 = 0