24 Commits

Author SHA1 Message Date
Antoine Cœur
f6fd858c20 Xcode 7 compatibility 2017-09-30 13:43:23 +08:00
Antoine Cœur
6ec780b26a macOS 10.8+ is needed 2017-09-30 13:22:44 +08:00
Antoine Cœur
f827cff917 2.0.8 2017-09-30 10:32:35 +08:00
Antoine Cœur
67f1711fe0 Merge pull request #385 from ZipArchive/encoding_autodetection
supporting encoding detection
2017-09-29 12:43:52 -05:00
Antoine Cœur
6f0bb4e9b4 fix #315 by removing the size_filename test.
latest minizip.
2017-09-30 01:42:17 +08:00
Antoine Cœur
5c10b9bed2 hexa is more readable than base64 for debugging unknown encodings 2017-09-29 19:06:16 +08:00
Antoine Cœur
eed7d2368d removing iOS 7 compatibility 2017-09-29 02:43:27 +08:00
Antoine Cœur
b75031acd0 supporting encoding detection 2017-09-29 02:29:04 +08:00
Antoine Cœur
d6eea31fea Xcode 9 friendly solution for logs 2017-09-28 03:32:49 +08:00
Antoine Cœur
b65da3ff20 hiding system messages on simulator 2017-09-28 01:32:31 +08:00
Antoine Cœur
76c8d2aeee parameters on separate lines 2017-09-21 15:59:34 +08:00
Antoine Cœur
a29b765b4b new devices 2017-09-21 15:57:56 +08:00
Antoine Cœur
5db5451166 fix regression from previous commit 2017-09-19 11:40:25 +08:00
Antoine Cœur
b9ce3814d4 latest minizip 2017-09-18 20:33:11 +08:00
Antoine Cœur
30eff54054 2.0.7 2017-09-18 11:32:01 +08:00
Antoine Cœur
d94e717193 updated copyright 2017-09-18 11:08:13 +08:00
Antoine Cœur
5666c74d61 Merge pull request #379 from ZipArchive/gregorian
fix zipInfo:setDate: when currentCalendar was not gregorian
2017-09-18 10:44:24 +08:00
Antoine Cœur
25fb5cdf58 fix zipInfo:setDate: when currentCalendar was not gregorian 2017-09-17 19:51:47 +08:00
Antoine Cœur
961d471d39 readability and simplifications 2017-09-17 00:55:52 +08:00
Antoine Cœur
ec2cc3f474 Merge pull request #377 from ZipArchive/unicode_passwords
unicode passwords support
2017-09-16 23:47:21 +08:00
Antoine Cœur
8f7d1bb6db add testZippingAndUnzippingWithUnicodePassword
fix testZipping and testZippingAndUnzippingForDate
2017-09-16 22:13:31 +08:00
Antoine Cœur
c8a93311b5 unicode passwords 2017-09-16 18:01:56 +08:00
Antoine Cœur
f9df6800d6 modernizing objectiveC 2017-09-14 00:31:27 +08:00
Antoine Cœur
bad8ca91e2 human readable xcodebuild destination 2017-09-13 20:12:05 +08:00
38 changed files with 1395 additions and 425 deletions

View File

@@ -5,35 +5,38 @@ xcode_scheme: ObjectiveCExample
matrix:
include:
- osx_image: xcode9
before_install: xcrun simctl erase "49D35834-277E-4C67-917F-A4C0769EBAC3"
env: DESTINATION="id=49D35834-277E-4C67-917F-A4C0769EBAC3" #`OS:11.0,name:iPhone 7 Plus` #oldest/newest for iOS 11.x
env: DESTINATION="iPhone X (11.0)" # oldest/newest for iOS 11.x
- osx_image: xcode9
before_install: xcrun simctl erase "F60B87EC-8969-41A7-90ED-D0826ECC32DB"
env: DESTINATION="id=F60B87EC-8969-41A7-90ED-D0826ECC32DB" #`OS:10.3.1,name:iPhone 7 Plus` #latest for iOS 10.x
env: DESTINATION="iPhone 7 Plus (10.3.1)" # latest for iOS 10.x
- osx_image: xcode8.3
before_install: xcrun simctl erase "3AA26DE0-C2F0-4CAF-936D-09F1ECCF9BDA"
env: DESTINATION="id=3AA26DE0-C2F0-4CAF-936D-09F1ECCF9BDA" #`OS:10.0,name:iPhone 5` #oldest for iOS 10.x
env: DESTINATION="iPhone 5 (10.0)" # oldest for iOS 10.x
- osx_image: xcode8.3
before_install: xcrun simctl erase "43CD88FF-F754-4EA7-BB04-D879504B943B"
env: DESTINATION="id=43CD88FF-F754-4EA7-BB04-D879504B943B" #`OS:9.3,name:iPhone 6s Plus` #latest for iOS 9.x
env: DESTINATION="iPhone 6s Plus (9.3)" # latest for iOS 9.x
- osx_image: xcode7.3
before_install: xcrun simctl erase "0CFF0929-C816-40DD-82EE-5D39A252BC27"
env: DESTINATION="OS=9.0,name=iPhone 4s" #oldest for iOS 9.x
env: DESTINATION="iPhone 4s (9.0)" # oldest for iOS 9.x
- osx_image: xcode7.3
before_install: xcrun simctl erase "AECF5DE0-D8C3-4FFE-B5B2-FA69A730B17F"
env: DESTINATION="OS=8.4,name=iPhone 6 Plus" #latest for iOS 8.x
env: DESTINATION="iPhone 6 Plus (8.4)" # latest for iOS 8.x
- osx_image: xcode7.3
before_install: xcrun simctl erase "D72029C0-E8E1-4349-B423-E458466135B3"
env: DESTINATION="OS=8.1,name=iPhone 4s" #oldest for iOS 8.x
env: DESTINATION="iPhone 4s (8.1)" # oldest for iOS 8.x
script: xcodebuild
`` -workspace ObjectiveCExample/ObjectiveCExample.xcworkspace
`` -scheme ObjectiveCExample -sdk iphonesimulator
`` -destination "$DESTINATION"
`` -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test
before_install:
# Grepping destination device udid
- DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g')
# Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422
- open -a "simulator" --args -CurrentDeviceUDID $DESTINATION_UDID
script:
# Testing
- xcodebuild
`` -workspace ObjectiveCExample/ObjectiveCExample.xcworkspace
`` -scheme ObjectiveCExample_iOS
`` -sdk iphonesimulator
`` -destination "id=$DESTINATION_UDID"
`` -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES
`` test

View File

@@ -3,12 +3,47 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 47;
objects = {
/* Begin PBXBuildFile section */
09C572016004B12D6A6F9BFD /* Pods_ObjectiveCExampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BC9C4E518D9F4FF7C026523 /* Pods_ObjectiveCExampleTests.framework */; };
60F2CD131F797840FEEF41BF /* Pods_ObjectiveCExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E647562E4F5D61128404422A /* Pods_ObjectiveCExample.framework */; };
3773ADB61F7F453E009A4B2D /* CollectingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE1A131BDAA0A800709011 /* CollectingDelegate.m */; };
3773ADB71F7F4541009A4B2D /* SSZipArchiveTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE1A071BDA9FF300709011 /* SSZipArchiveTests.m */; };
3773ADB81F7F4D13009A4B2D /* hello.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A161BDAA10100709011 /* hello.zip */; };
3773ADB91F7F4D13009A4B2D /* IncorrectHeaders.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A171BDAA10100709011 /* IncorrectHeaders.zip */; };
3773ADBA1F7F4D13009A4B2D /* RelativeSymbolicLink.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A191BDAA10100709011 /* RelativeSymbolicLink.zip */; };
3773ADBB1F7F4D13009A4B2D /* SymbolicLink.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1A1BDAA10100709011 /* SymbolicLink.zip */; };
3773ADBC1F7F4D13009A4B2D /* TestArchive.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1B1BDAA10100709011 /* TestArchive.zip */; };
3773ADBD1F7F4D13009A4B2D /* TestPasswordArchive.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1C1BDAA10100709011 /* TestPasswordArchive.zip */; };
3773ADBE1F7F4D13009A4B2D /* Unicode.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1D1BDAA10100709011 /* Unicode.zip */; };
3773ADBF1F7F4D16009A4B2D /* PermissionsTestApp.app in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A181BDAA10100709011 /* PermissionsTestApp.app */; };
3773ADC01F7F4D1C009A4B2D /* 0.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1F1BDAA10100709011 /* 0.m4a */; };
3773ADC11F7F4D1C009A4B2D /* 1.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A201BDAA10100709011 /* 1.m4a */; };
3773ADC21F7F4D1C009A4B2D /* 2.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A211BDAA10100709011 /* 2.m4a */; };
3773ADC31F7F4D1C009A4B2D /* 3.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A221BDAA10100709011 /* 3.m4a */; };
3773ADC41F7F4D1C009A4B2D /* 4.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A231BDAA10100709011 /* 4.m4a */; };
3773ADC51F7F4D1C009A4B2D /* 5.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A241BDAA10100709011 /* 5.m4a */; };
3773ADC61F7F4D1C009A4B2D /* 6.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A251BDAA10100709011 /* 6.m4a */; };
3773ADC71F7F4D1C009A4B2D /* 7.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A261BDAA10100709011 /* 7.m4a */; };
3793E6DF1F7F6048000B1A19 /* CollectingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE1A131BDAA0A800709011 /* CollectingDelegate.m */; };
3793E6E01F7F604B000B1A19 /* SSZipArchiveTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE1A071BDA9FF300709011 /* SSZipArchiveTests.m */; };
3793E6E11F7F6052000B1A19 /* 0.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1F1BDAA10100709011 /* 0.m4a */; };
3793E6E21F7F6052000B1A19 /* 1.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A201BDAA10100709011 /* 1.m4a */; };
3793E6E31F7F6052000B1A19 /* 2.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A211BDAA10100709011 /* 2.m4a */; };
3793E6E41F7F6052000B1A19 /* 3.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A221BDAA10100709011 /* 3.m4a */; };
3793E6E51F7F6052000B1A19 /* 4.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A231BDAA10100709011 /* 4.m4a */; };
3793E6E61F7F6052000B1A19 /* 5.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A241BDAA10100709011 /* 5.m4a */; };
3793E6E71F7F6052000B1A19 /* 6.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A251BDAA10100709011 /* 6.m4a */; };
3793E6E81F7F6052000B1A19 /* 7.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A261BDAA10100709011 /* 7.m4a */; };
3793E6E91F7F6059000B1A19 /* hello.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A161BDAA10100709011 /* hello.zip */; };
3793E6EA1F7F6059000B1A19 /* IncorrectHeaders.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A171BDAA10100709011 /* IncorrectHeaders.zip */; };
3793E6EB1F7F6059000B1A19 /* RelativeSymbolicLink.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A191BDAA10100709011 /* RelativeSymbolicLink.zip */; };
3793E6EC1F7F6059000B1A19 /* SymbolicLink.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1A1BDAA10100709011 /* SymbolicLink.zip */; };
3793E6ED1F7F6059000B1A19 /* TestArchive.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1B1BDAA10100709011 /* TestArchive.zip */; };
3793E6EE1F7F6059000B1A19 /* TestPasswordArchive.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1C1BDAA10100709011 /* TestPasswordArchive.zip */; };
3793E6EF1F7F6059000B1A19 /* Unicode.zip in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A1D1BDAA10100709011 /* Unicode.zip */; };
3793E6F01F7F605C000B1A19 /* PermissionsTestApp.app in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE1A181BDAA10100709011 /* PermissionsTestApp.app */; };
6BFA1E5841DFEC4E21BA7543 /* Pods_core_ObjectiveCExampleTests_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 38A85B006A1C84E475375AE1 /* Pods_core_ObjectiveCExampleTests_macOS.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 */; };
@@ -33,6 +68,9 @@
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 */; };
C77CFC8C1852DCA7782A7CCB /* Pods_core_ObjectiveCExampleTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5FBFA6A604DC4631E2B97F9 /* Pods_core_ObjectiveCExampleTests_iOS.framework */; };
E31E9B694ECEB2E3932D8597 /* Pods_core_ObjectiveCExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49974600DB985CD98FC3AD39 /* Pods_core_ObjectiveCExample.framework */; };
F70E9D3A6F1E9FF335385D4A /* Pods_core_ObjectiveCExampleTests_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D314711A618CA3AC838E95C1 /* Pods_core_ObjectiveCExampleTests_tvOS.framework */; };
F7D6D86D1CFB2C4900DA6DA6 /* Sample Data in Resources */ = {isa = PBXBuildFile; fileRef = F7D6D86C1CFB2C4900DA6DA6 /* Sample Data */; };
/* End PBXBuildFile section */
@@ -47,8 +85,14 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
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>"; };
7BC9C4E518D9F4FF7C026523 /* Pods_ObjectiveCExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ObjectiveCExampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
04CB37570807602F7E5C66D9 /* Pods-core-ObjectiveCExampleTests_macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-core-ObjectiveCExampleTests_macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_macOS/Pods-core-ObjectiveCExampleTests_macOS.release.xcconfig"; sourceTree = "<group>"; };
254DE0B206EE66F57BBE7EEE /* Pods-core-ObjectiveCExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-core-ObjectiveCExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-core-ObjectiveCExample/Pods-core-ObjectiveCExample.release.xcconfig"; sourceTree = "<group>"; };
3773ADAE1F7F44D8009A4B2D /* ObjectiveCExampleTests_macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ObjectiveCExampleTests_macOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3793E6D71F7F5F93000B1A19 /* ObjectiveCExampleTests_tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ObjectiveCExampleTests_tvOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
38A85B006A1C84E475375AE1 /* Pods_core_ObjectiveCExampleTests_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_core_ObjectiveCExampleTests_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48AB7DF053F85FCC6AFB0C26 /* Pods-core-ObjectiveCExampleTests_macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-core-ObjectiveCExampleTests_macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_macOS/Pods-core-ObjectiveCExampleTests_macOS.debug.xcconfig"; sourceTree = "<group>"; };
49974600DB985CD98FC3AD39 /* Pods_core_ObjectiveCExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_core_ObjectiveCExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
51F30FF220ECFD8DC810E21A /* Pods-core-ObjectiveCExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-core-ObjectiveCExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-core-ObjectiveCExample/Pods-core-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>"; };
@@ -59,7 +103,7 @@
8DFE19F91BDA9FF300709011 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8DFE19FC1BDA9FF300709011 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
8DFE19FE1BDA9FF300709011 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8DFE1A031BDA9FF300709011 /* ObjectiveCExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ObjectiveCExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8DFE1A031BDA9FF300709011 /* ObjectiveCExampleTests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ObjectiveCExampleTests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8DFE1A071BDA9FF300709011 /* SSZipArchiveTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SSZipArchiveTests.m; sourceTree = "<group>"; };
8DFE1A091BDA9FF300709011 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8DFE1A121BDAA0A800709011 /* CollectingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectingDelegate.h; sourceTree = "<group>"; };
@@ -80,19 +124,37 @@
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>"; };
B263C1FEBD2BEC1D1C4133CC /* Pods-ObjectiveCExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ObjectiveCExampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ObjectiveCExampleTests/Pods-ObjectiveCExampleTests.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>"; };
C12D647350722C151A02D17C /* Pods-ObjectiveCExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ObjectiveCExampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ObjectiveCExampleTests/Pods-ObjectiveCExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
E647562E4F5D61128404422A /* Pods_ObjectiveCExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ObjectiveCExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A2E5B3BB819D409D02E989BC /* Pods-core-ObjectiveCExampleTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-core-ObjectiveCExampleTests_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_iOS/Pods-core-ObjectiveCExampleTests_iOS.debug.xcconfig"; sourceTree = "<group>"; };
A5FBFA6A604DC4631E2B97F9 /* Pods_core_ObjectiveCExampleTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_core_ObjectiveCExampleTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CD7C1D2CFA646F90A02312F4 /* Pods-core-ObjectiveCExampleTests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-core-ObjectiveCExampleTests_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_iOS/Pods-core-ObjectiveCExampleTests_iOS.release.xcconfig"; sourceTree = "<group>"; };
D314711A618CA3AC838E95C1 /* Pods_core_ObjectiveCExampleTests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_core_ObjectiveCExampleTests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DC1DEADE9E9CE0AF5B487DCF /* Pods-core-ObjectiveCExampleTests_tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-core-ObjectiveCExampleTests_tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_tvOS/Pods-core-ObjectiveCExampleTests_tvOS.release.xcconfig"; sourceTree = "<group>"; };
F7D6D86C1CFB2C4900DA6DA6 /* Sample Data */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "Sample Data"; sourceTree = "<group>"; };
FB7EEC7952E1561D1E668B3B /* Pods-core-ObjectiveCExampleTests_tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-core-ObjectiveCExampleTests_tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_tvOS/Pods-core-ObjectiveCExampleTests_tvOS.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
3773ADAB1F7F44D8009A4B2D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6BFA1E5841DFEC4E21BA7543 /* Pods_core_ObjectiveCExampleTests_macOS.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
3793E6D41F7F5F93000B1A19 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F70E9D3A6F1E9FF335385D4A /* Pods_core_ObjectiveCExampleTests_tvOS.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8DFE19E71BDA9FF300709011 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
60F2CD131F797840FEEF41BF /* Pods_ObjectiveCExample.framework in Frameworks */,
E31E9B694ECEB2E3932D8597 /* Pods_core_ObjectiveCExample.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -100,7 +162,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
09C572016004B12D6A6F9BFD /* Pods_ObjectiveCExampleTests.framework in Frameworks */,
C77CFC8C1852DCA7782A7CCB /* Pods_core_ObjectiveCExampleTests_iOS.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -110,10 +172,14 @@
133E0B9323A7D3A1E738A45C /* Pods */ = {
isa = PBXGroup;
children = (
78F9C8623D65380774875E92 /* Pods-ObjectiveCExample.debug.xcconfig */,
BF4E88C3450A127B14A949C2 /* Pods-ObjectiveCExample.release.xcconfig */,
C12D647350722C151A02D17C /* Pods-ObjectiveCExampleTests.debug.xcconfig */,
B263C1FEBD2BEC1D1C4133CC /* Pods-ObjectiveCExampleTests.release.xcconfig */,
51F30FF220ECFD8DC810E21A /* Pods-core-ObjectiveCExample.debug.xcconfig */,
254DE0B206EE66F57BBE7EEE /* Pods-core-ObjectiveCExample.release.xcconfig */,
48AB7DF053F85FCC6AFB0C26 /* Pods-core-ObjectiveCExampleTests_macOS.debug.xcconfig */,
04CB37570807602F7E5C66D9 /* Pods-core-ObjectiveCExampleTests_macOS.release.xcconfig */,
A2E5B3BB819D409D02E989BC /* Pods-core-ObjectiveCExampleTests_iOS.debug.xcconfig */,
CD7C1D2CFA646F90A02312F4 /* Pods-core-ObjectiveCExampleTests_iOS.release.xcconfig */,
FB7EEC7952E1561D1E668B3B /* Pods-core-ObjectiveCExampleTests_tvOS.debug.xcconfig */,
DC1DEADE9E9CE0AF5B487DCF /* Pods-core-ObjectiveCExampleTests_tvOS.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
@@ -133,7 +199,9 @@
isa = PBXGroup;
children = (
8DFE19EA1BDA9FF300709011 /* ObjectiveCExample.app */,
8DFE1A031BDA9FF300709011 /* ObjectiveCExampleTests.xctest */,
8DFE1A031BDA9FF300709011 /* ObjectiveCExampleTests_iOS.xctest */,
3773ADAE1F7F44D8009A4B2D /* ObjectiveCExampleTests_macOS.xctest */,
3793E6D71F7F5F93000B1A19 /* ObjectiveCExampleTests_tvOS.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -209,8 +277,10 @@
C0E3885084B2150B8F297B76 /* Frameworks */ = {
isa = PBXGroup;
children = (
E647562E4F5D61128404422A /* Pods_ObjectiveCExample.framework */,
7BC9C4E518D9F4FF7C026523 /* Pods_ObjectiveCExampleTests.framework */,
49974600DB985CD98FC3AD39 /* Pods_core_ObjectiveCExample.framework */,
A5FBFA6A604DC4631E2B97F9 /* Pods_core_ObjectiveCExampleTests_iOS.framework */,
38A85B006A1C84E475375AE1 /* Pods_core_ObjectiveCExampleTests_macOS.framework */,
D314711A618CA3AC838E95C1 /* Pods_core_ObjectiveCExampleTests_tvOS.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -218,6 +288,46 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
3773ADAD1F7F44D8009A4B2D /* ObjectiveCExampleTests_macOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 3773ADB51F7F44D9009A4B2D /* Build configuration list for PBXNativeTarget "ObjectiveCExampleTests_macOS" */;
buildPhases = (
9118978BA07845D66F76FA15 /* [CP] Check Pods Manifest.lock */,
3773ADAA1F7F44D8009A4B2D /* Sources */,
3773ADAB1F7F44D8009A4B2D /* Frameworks */,
3773ADAC1F7F44D8009A4B2D /* Resources */,
CAB5CA5258A34C1F6C699857 /* [CP] Embed Pods Frameworks */,
E2575624354B48B09E5AC0D8 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = ObjectiveCExampleTests_macOS;
productName = ObjectiveCExample_macOS_test;
productReference = 3773ADAE1F7F44D8009A4B2D /* ObjectiveCExampleTests_macOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
3793E6D61F7F5F93000B1A19 /* ObjectiveCExampleTests_tvOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 3793E6DC1F7F5F93000B1A19 /* Build configuration list for PBXNativeTarget "ObjectiveCExampleTests_tvOS" */;
buildPhases = (
5F7F9AC51A6CCCF0FB33CC1E /* [CP] Check Pods Manifest.lock */,
3793E6D31F7F5F93000B1A19 /* Sources */,
3793E6D41F7F5F93000B1A19 /* Frameworks */,
3793E6D51F7F5F93000B1A19 /* Resources */,
E494A9BD8D1B57040775206F /* [CP] Embed Pods Frameworks */,
44EE5B4B0C619E2040D8D890 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = ObjectiveCExampleTests_tvOS;
productName = ObjectiveCExampleTests_tvOS;
productReference = 3793E6D71F7F5F93000B1A19 /* ObjectiveCExampleTests_tvOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
8DFE19E91BDA9FF300709011 /* ObjectiveCExample */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8DFE1A0C1BDA9FF300709011 /* Build configuration list for PBXNativeTarget "ObjectiveCExample" */;
@@ -238,9 +348,9 @@
productReference = 8DFE19EA1BDA9FF300709011 /* ObjectiveCExample.app */;
productType = "com.apple.product-type.application";
};
8DFE1A021BDA9FF300709011 /* ObjectiveCExampleTests */ = {
8DFE1A021BDA9FF300709011 /* ObjectiveCExampleTests_iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8DFE1A0F1BDA9FF300709011 /* Build configuration list for PBXNativeTarget "ObjectiveCExampleTests" */;
buildConfigurationList = 8DFE1A0F1BDA9FF300709011 /* Build configuration list for PBXNativeTarget "ObjectiveCExampleTests_iOS" */;
buildPhases = (
3849EE691EA1B366503B4C96 /* [CP] Check Pods Manifest.lock */,
8DFE19FF1BDA9FF300709011 /* Sources */,
@@ -254,9 +364,9 @@
dependencies = (
8DFE1A051BDA9FF300709011 /* PBXTargetDependency */,
);
name = ObjectiveCExampleTests;
name = ObjectiveCExampleTests_iOS;
productName = ObjectiveCExampleTests;
productReference = 8DFE1A031BDA9FF300709011 /* ObjectiveCExampleTests.xctest */;
productReference = 8DFE1A031BDA9FF300709011 /* ObjectiveCExampleTests_iOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
@@ -267,6 +377,14 @@
attributes = {
LastUpgradeCheck = 0900;
TargetAttributes = {
3773ADAD1F7F44D8009A4B2D = {
CreatedOnToolsVersion = 9.1;
ProvisioningStyle = Automatic;
};
3793E6D61F7F5F93000B1A19 = {
CreatedOnToolsVersion = 9.1;
ProvisioningStyle = Automatic;
};
8DFE19E91BDA9FF300709011 = {
CreatedOnToolsVersion = 7.1;
};
@@ -277,7 +395,7 @@
};
};
buildConfigurationList = 8DFE19E51BDA9FF300709011 /* Build configuration list for PBXProject "ObjectiveCExample" */;
compatibilityVersion = "Xcode 3.2";
compatibilityVersion = "Xcode 6.3";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
@@ -290,12 +408,60 @@
projectRoot = "";
targets = (
8DFE19E91BDA9FF300709011 /* ObjectiveCExample */,
8DFE1A021BDA9FF300709011 /* ObjectiveCExampleTests */,
8DFE1A021BDA9FF300709011 /* ObjectiveCExampleTests_iOS */,
3773ADAD1F7F44D8009A4B2D /* ObjectiveCExampleTests_macOS */,
3793E6D61F7F5F93000B1A19 /* ObjectiveCExampleTests_tvOS */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
3773ADAC1F7F44D8009A4B2D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3773ADC31F7F4D1C009A4B2D /* 3.m4a in Resources */,
3773ADC21F7F4D1C009A4B2D /* 2.m4a in Resources */,
3773ADC41F7F4D1C009A4B2D /* 4.m4a in Resources */,
3773ADC01F7F4D1C009A4B2D /* 0.m4a in Resources */,
3773ADC51F7F4D1C009A4B2D /* 5.m4a in Resources */,
3773ADB91F7F4D13009A4B2D /* IncorrectHeaders.zip in Resources */,
3773ADC11F7F4D1C009A4B2D /* 1.m4a in Resources */,
3773ADBE1F7F4D13009A4B2D /* Unicode.zip in Resources */,
3773ADBF1F7F4D16009A4B2D /* PermissionsTestApp.app in Resources */,
3773ADBB1F7F4D13009A4B2D /* SymbolicLink.zip in Resources */,
3773ADBA1F7F4D13009A4B2D /* RelativeSymbolicLink.zip in Resources */,
3773ADB81F7F4D13009A4B2D /* hello.zip in Resources */,
3773ADC71F7F4D1C009A4B2D /* 7.m4a in Resources */,
3773ADC61F7F4D1C009A4B2D /* 6.m4a in Resources */,
3773ADBC1F7F4D13009A4B2D /* TestArchive.zip in Resources */,
3773ADBD1F7F4D13009A4B2D /* TestPasswordArchive.zip in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
3793E6D51F7F5F93000B1A19 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3793E6E71F7F6052000B1A19 /* 6.m4a in Resources */,
3793E6E91F7F6059000B1A19 /* hello.zip in Resources */,
3793E6F01F7F605C000B1A19 /* PermissionsTestApp.app in Resources */,
3793E6ED1F7F6059000B1A19 /* TestArchive.zip in Resources */,
3793E6E61F7F6052000B1A19 /* 5.m4a in Resources */,
3793E6E41F7F6052000B1A19 /* 3.m4a in Resources */,
3793E6EB1F7F6059000B1A19 /* RelativeSymbolicLink.zip in Resources */,
3793E6EF1F7F6059000B1A19 /* Unicode.zip in Resources */,
3793E6EA1F7F6059000B1A19 /* IncorrectHeaders.zip in Resources */,
3793E6EE1F7F6059000B1A19 /* TestPasswordArchive.zip in Resources */,
3793E6E51F7F6052000B1A19 /* 4.m4a in Resources */,
3793E6E81F7F6052000B1A19 /* 7.m4a in Resources */,
3793E6E31F7F6052000B1A19 /* 2.m4a in Resources */,
3793E6EC1F7F6059000B1A19 /* SymbolicLink.zip in Resources */,
3793E6E21F7F6052000B1A19 /* 1.m4a in Resources */,
3793E6E11F7F6052000B1A19 /* 0.m4a in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8DFE19E81BDA9FF300709011 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -344,21 +510,36 @@
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-ObjectiveCExampleTests-checkManifestLockResult.txt",
"$(DERIVED_FILE_DIR)/Pods-core-ObjectiveCExampleTests_iOS-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
44EE5B4B0C619E2040D8D890 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_tvOS/Pods-core-ObjectiveCExampleTests_tvOS-resources.sh\"\n";
showEnvVarsInLog = 0;
};
486F364061BAD3921A1CA2C8 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExampleTests/Pods-ObjectiveCExampleTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework",
"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_iOS/Pods-core-ObjectiveCExampleTests_iOS-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/SSZipArchive-iOS/SSZipArchive.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
@@ -366,7 +547,25 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExampleTests/Pods-ObjectiveCExampleTests-frameworks.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_iOS/Pods-core-ObjectiveCExampleTests_iOS-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
5F7F9AC51A6CCCF0FB33CC1E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-core-ObjectiveCExampleTests_tvOS-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
8328CABE589F0AEC0D43D7CC /* [CP] Copy Pods Resources */ = {
@@ -381,7 +580,25 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExample/Pods-core-ObjectiveCExample-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9118978BA07845D66F76FA15 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-core-ObjectiveCExampleTests_macOS-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
B17DD0CEF4553EDB98836D32 /* [CP] Check Pods Manifest.lock */ = {
@@ -395,7 +612,7 @@
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-ObjectiveCExample-checkManifestLockResult.txt",
"$(DERIVED_FILE_DIR)/Pods-core-ObjectiveCExample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -408,8 +625,8 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework",
"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExample/Pods-core-ObjectiveCExample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/SSZipArchive-iOS/SSZipArchive.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
@@ -417,7 +634,58 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample-frameworks.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExample/Pods-core-ObjectiveCExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
CAB5CA5258A34C1F6C699857 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_macOS/Pods-core-ObjectiveCExampleTests_macOS-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/SSZipArchive-macOS/SSZipArchive.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_macOS/Pods-core-ObjectiveCExampleTests_macOS-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E2575624354B48B09E5AC0D8 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_macOS/Pods-core-ObjectiveCExampleTests_macOS-resources.sh\"\n";
showEnvVarsInLog = 0;
};
E494A9BD8D1B57040775206F /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_tvOS/Pods-core-ObjectiveCExampleTests_tvOS-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/SSZipArchive-tvOS/SSZipArchive.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_tvOS/Pods-core-ObjectiveCExampleTests_tvOS-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
ED17275C640D443076C514CE /* [CP] Copy Pods Resources */ = {
@@ -432,12 +700,30 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExampleTests/Pods-ObjectiveCExampleTests-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-core-ObjectiveCExampleTests_iOS/Pods-core-ObjectiveCExampleTests_iOS-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
3773ADAA1F7F44D8009A4B2D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3773ADB71F7F4541009A4B2D /* SSZipArchiveTests.m in Sources */,
3773ADB61F7F453E009A4B2D /* CollectingDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
3793E6D31F7F5F93000B1A19 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3793E6E01F7F604B000B1A19 /* SSZipArchiveTests.m in Sources */,
3793E6DF1F7F6048000B1A19 /* CollectingDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8DFE19E61BDA9FF300709011 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -487,6 +773,94 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
3773ADB31F7F44D9009A4B2D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 48AB7DF053F85FCC6AFB0C26 /* Pods-core-ObjectiveCExampleTests_macOS.debug.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = ObjectiveCExampleTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ziparchive.ObjectiveCExample-macOS-test";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
};
name = Debug;
};
3773ADB41F7F44D9009A4B2D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 04CB37570807602F7E5C66D9 /* Pods-core-ObjectiveCExampleTests_macOS.release.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = ObjectiveCExampleTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ziparchive.ObjectiveCExample-macOS-test";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
};
name = Release;
};
3793E6DD1F7F5F93000B1A19 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FB7EEC7952E1561D1E668B3B /* Pods-core-ObjectiveCExampleTests_tvOS.debug.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_STYLE = Automatic;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = ObjectiveCExampleTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ziparchive.ObjectiveCExampleTests-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.1;
};
name = Debug;
};
3793E6DE1F7F5F93000B1A19 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DC1DEADE9E9CE0AF5B487DCF /* Pods-core-ObjectiveCExampleTests_tvOS.release.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_STYLE = Automatic;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = ObjectiveCExampleTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.ziparchive.ObjectiveCExampleTests-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.1;
};
name = Release;
};
8DFE1A0A1BDA9FF300709011 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -506,6 +880,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES_AGGRESSIVE;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
@@ -514,6 +889,8 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_ACTIVITY_MODE = "";
"DEBUG_ACTIVITY_MODE[sdk=iphonesimulator*]" = default;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -532,6 +909,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MACOSX_DEPLOYMENT_TARGET = 10.8;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -558,6 +936,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES_AGGRESSIVE;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
@@ -566,6 +945,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_ACTIVITY_MODE = "";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -578,6 +958,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MACOSX_DEPLOYMENT_TARGET = 10.8;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -587,7 +968,7 @@
};
8DFE1A0D1BDA9FF300709011 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 78F9C8623D65380774875E92 /* Pods-ObjectiveCExample.debug.xcconfig */;
baseConfigurationReference = 51F30FF220ECFD8DC810E21A /* Pods-core-ObjectiveCExample.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = ObjectiveCExample/Info.plist;
@@ -599,7 +980,7 @@
};
8DFE1A0E1BDA9FF300709011 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = BF4E88C3450A127B14A949C2 /* Pods-ObjectiveCExample.release.xcconfig */;
baseConfigurationReference = 254DE0B206EE66F57BBE7EEE /* Pods-core-ObjectiveCExample.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = ObjectiveCExample/Info.plist;
@@ -611,7 +992,7 @@
};
8DFE1A101BDA9FF300709011 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C12D647350722C151A02D17C /* Pods-ObjectiveCExampleTests.debug.xcconfig */;
baseConfigurationReference = A2E5B3BB819D409D02E989BC /* Pods-core-ObjectiveCExampleTests_iOS.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = ObjectiveCExampleTests/Info.plist;
@@ -624,7 +1005,7 @@
};
8DFE1A111BDA9FF300709011 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B263C1FEBD2BEC1D1C4133CC /* Pods-ObjectiveCExampleTests.release.xcconfig */;
baseConfigurationReference = CD7C1D2CFA646F90A02312F4 /* Pods-core-ObjectiveCExampleTests_iOS.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = ObjectiveCExampleTests/Info.plist;
@@ -638,6 +1019,24 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
3773ADB51F7F44D9009A4B2D /* Build configuration list for PBXNativeTarget "ObjectiveCExampleTests_macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3773ADB31F7F44D9009A4B2D /* Debug */,
3773ADB41F7F44D9009A4B2D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
3793E6DC1F7F5F93000B1A19 /* Build configuration list for PBXNativeTarget "ObjectiveCExampleTests_tvOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3793E6DD1F7F5F93000B1A19 /* Debug */,
3793E6DE1F7F5F93000B1A19 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DFE19E51BDA9FF300709011 /* Build configuration list for PBXProject "ObjectiveCExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@@ -656,7 +1055,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DFE1A0F1BDA9FF300709011 /* Build configuration list for PBXNativeTarget "ObjectiveCExampleTests" */ = {
8DFE1A0F1BDA9FF300709011 /* Build configuration list for PBXNativeTarget "ObjectiveCExampleTests_iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8DFE1A101BDA9FF300709011 /* Debug */,

View File

@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
@@ -33,8 +34,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DFE1A021BDA9FF300709011"
BuildableName = "ObjectiveCExampleTests.xctest"
BlueprintName = "ObjectiveCExampleTests"
BuildableName = "ObjectiveCExampleTests_iOS.xctest"
BlueprintName = "ObjectiveCExampleTests_iOS"
ReferencedContainer = "container:ObjectiveCExample.xcodeproj">
</BuildableReference>
</TestableReference>
@@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
@@ -71,6 +73,13 @@
ReferencedContainer = "container:ObjectiveCExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "${DEBUG_ACTIVITY_MODE}"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3773ADAD1F7F44D8009A4B2D"
BuildableName = "ObjectiveCExampleTests_macOS.xctest"
BlueprintName = "ObjectiveCExampleTests_macOS"
ReferencedContainer = "container:ObjectiveCExample.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3793E6D61F7F5F93000B1A19"
BuildableName = "ObjectiveCExampleTests_tvOS.xctest"
BlueprintName = "ObjectiveCExampleTests_tvOS"
ReferencedContainer = "container:ObjectiveCExample.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -5,5 +5,5 @@
* Test delegate by collecting its calls
*/
@interface CollectingDelegate : NSObject <SSZipArchiveDelegate>
@property(nonatomic, retain) NSMutableArray *files;
@end
@property(nonatomic, retain) NSMutableArray<NSString *> *files;
@end

View File

@@ -61,6 +61,8 @@
- (void)testZipping {
// use extracted files from [-testUnzipping]
[self testUnzipping];
NSString *inputPath = [self _cachesPath:@"Regular"];
NSArray *inputPaths = @[[inputPath stringByAppendingPathComponent:@"Readme.markdown"],
[inputPath stringByAppendingPathComponent:@"LICENSE"]];
@@ -68,8 +70,9 @@
NSString *outputPath = [self _cachesPath:@"Zipped"];
NSString *archivePath = [outputPath stringByAppendingPathComponent:@"CreatedArchive.zip"];
[SSZipArchive createZipFileAtPath:archivePath withFilesAtPaths:inputPaths];
BOOL success = [SSZipArchive createZipFileAtPath:archivePath withFilesAtPaths:inputPaths];
XCTAssertTrue(success);
// TODO: Make sure the files are actually unzipped. They are, but the test should be better.
XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:archivePath], @"Archive created");
}
@@ -82,13 +85,13 @@
NSString *outputPath = [self _cachesPath:@"FolderZipped"];
NSString *archivePath = [outputPath stringByAppendingPathComponent:@"ArchiveWithFolders.zip"];
[SSZipArchive createZipFileAtPath:archivePath withContentsOfDirectory:inputPath];
BOOL success = [SSZipArchive createZipFileAtPath:archivePath withContentsOfDirectory:inputPath];
XCTAssertTrue(success);
XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:archivePath], @"Folder Archive created");
}
- (void)testMultipleZippping{
NSArray *inputPaths = @[[[NSBundle bundleForClass: [self class]]pathForResource:@"0" ofType:@"m4a"],
[[NSBundle bundleForClass: [self class]]pathForResource:@"1" ofType:@"m4a"],
[[NSBundle bundleForClass: [self class]]pathForResource:@"2" ofType:@"m4a"],
[[NSBundle bundleForClass: [self class]]pathForResource:@"3" ofType:@"m4a"],
@@ -106,8 +109,9 @@
// Zipping
NSString *archivePath = [outputPath stringByAppendingPathComponent:[NSString stringWithFormat:@"queue_test_%d.zip",test]];
[SSZipArchive createZipFileAtPath:archivePath withFilesAtPaths:inputPaths];
BOOL success = [SSZipArchive createZipFileAtPath:archivePath withFilesAtPaths:inputPaths];
XCTAssertTrue(success);
long long threshold = 510000; // 510kB:size slightly smaller than a successful zip, but much larger than a failed one
long long fileSize = [[[NSFileManager defaultManager] attributesOfItemAtPath:archivePath error:nil][NSFileSize] longLongValue];
XCTAssertTrue(fileSize > threshold, @"zipping failed at %@!",archivePath);
@@ -119,8 +123,9 @@
NSString *zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"TestArchive" ofType:@"zip"];
NSString *outputPath = [self _cachesPath:@"Regular"];
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
XCTAssertTrue(success);
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *testPath = [outputPath stringByAppendingPathComponent:@"Readme.markdown"];
XCTAssertTrue([fileManager fileExistsAtPath:testPath], @"Readme unzipped");
@@ -132,8 +137,9 @@
NSString *zipPath = [[NSBundle bundleForClass: [self class]] pathForResource:@"TestArchive" ofType:@"zip"];
NSString *outputPath = [self _cachesPath:@"Regular"];
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
XCTAssertTrue(success);
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *testPath = [outputPath stringByAppendingPathComponent:@"Readme.markdown"];
XCTAssertTrue([fileManager fileExistsAtPath:testPath], @"Readme unzipped");
@@ -147,8 +153,9 @@
[progressEvents removeAllObjects];
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
XCTAssertTrue(success);
// 4 events: the first, then for each of the two files one, then the final event
XCTAssertTrue(4 == [progressEvents count], @"Expected 4 progress events");
XCTAssertTrue(0 == [progressEvents[0] intValue]);
@@ -163,8 +170,9 @@
NSString *outputPath = [self _cachesPath:@"Password"];
NSError *error = nil;
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath overwrite:YES password:@"passw0rd" error:&error delegate:self];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath overwrite:YES password:@"passw0rd" error:&error delegate:self];
XCTAssertTrue(success);
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *testPath = [outputPath stringByAppendingPathComponent:@"Readme.markdown"];
XCTAssertTrue([fileManager fileExistsAtPath:testPath], @"Readme unzipped");
@@ -178,7 +186,8 @@
NSString *outputPath = [self _cachesPath:@"Password"];
NSError *error = nil;
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath overwrite:YES password:@"passw0rd123" error:&error delegate:self];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath overwrite:YES password:@"passw0rd123" error:&error delegate:self];
XCTAssertTrue(success);
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *testPath = [outputPath stringByAppendingPathComponent:@"Readme.markdown"];
@@ -217,13 +226,49 @@
XCTAssertTrue(protected, @"has password");
}
- (void)testZippingAndUnzippingWithUnicodePassword {
/********** Zipping ********/
// use extracted files from [-testUnzipping]
[self testUnzipping];
NSString *inputPath = [self _cachesPath:@"Regular"];
NSArray *inputPaths = @[[inputPath stringByAppendingPathComponent:@"Readme.markdown"],
[inputPath stringByAppendingPathComponent:@"LICENSE"]];
NSString *outputPath = [self _cachesPath:@"Zipped"];
NSString *archivePath = [outputPath stringByAppendingPathComponent:@"CreatedUnicodePasswordArchive.zip"];
BOOL success = [SSZipArchive createZipFileAtPath:archivePath withFilesAtPaths:inputPaths withPassword:@"ꊐ⌒Ⅳ🤐"];
XCTAssertTrue(success);
XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:archivePath], @"Archive created");
/********** Unzipping ********/
outputPath = [self _cachesPath:@"UnicodePassword"];
NSError *error = nil;
success = [SSZipArchive unzipFileAtPath:archivePath toDestination:outputPath overwrite:YES password:@"ꊐ⌒Ⅳ🤐" error:&error delegate:self];
XCTAssertTrue(success);
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *testPath = [outputPath stringByAppendingPathComponent:@"Readme.markdown"];
XCTAssertTrue([fileManager fileExistsAtPath:testPath], @"Readme unzipped");
testPath = [outputPath stringByAppendingPathComponent:@"LICENSE"];
XCTAssertTrue([fileManager fileExistsAtPath:testPath], @"LICENSE unzipped");
}
//Temp Disabled test, fix is not yet in the AES version of the unzip lib
//- (void)testUnzippingTruncatedFileFix {
// NSString* zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"IncorrectHeaders" ofType:@"zip"];
// NSString* outputPath = [self _cachesPath:@"IncorrectHeaders"];
//
// [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
// BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
// XCTAssertTrue(success);
//
// NSString* intendedReadmeTxtMD5 = @"31ac96301302eb388070c827447290b5";
//
@@ -240,8 +285,9 @@
NSString* zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"SymbolicLink" ofType:@"zip"];
NSString* outputPath = [self _cachesPath:@"SymbolicLink"];
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
XCTAssertTrue(success);
NSString *testSymlink = [outputPath stringByAppendingPathComponent:@"SymbolicLink/Xcode.app"];
NSError *error = nil;
@@ -256,8 +302,9 @@
NSString* zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:resourceName ofType:@"zip"];
NSString* outputPath = [self _cachesPath:resourceName];
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
XCTAssertTrue(success);
// Determine where the symlinks are
NSString *subfolderName = @"symlinks";
NSString *testBasePath = [NSString pathWithComponents:@[outputPath]];
@@ -278,8 +325,9 @@
NSString* zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"Unicode" ofType:@"zip"];
NSString* outputPath = [self _cachesPath:@"Unicode"];
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];
XCTAssertTrue(success);
bool unicodeFilenameWasExtracted = [[NSFileManager defaultManager] fileExistsAtPath:[outputPath stringByAppendingPathComponent:@"Accént.txt"]];
bool unicodeFolderWasExtracted = [[NSFileManager defaultManager] fileExistsAtPath:[outputPath stringByAppendingPathComponent:@"Fólder/Nothing.txt"]];
@@ -291,6 +339,8 @@
- (void)testZippingAndUnzippingForDate {
// use extracted files from [-testUnzipping]
[self testUnzipping];
NSString *inputPath = [self _cachesPath:@"Regular"];
NSArray *inputPaths = @[[inputPath stringByAppendingPathComponent:@"Readme.markdown"]];
@@ -299,8 +349,10 @@
NSString *outputPath = [self _cachesPath:@"ZippedDate"];
NSString *archivePath = [outputPath stringByAppendingPathComponent:@"CreatedArchive.zip"];
[SSZipArchive createZipFileAtPath:archivePath withFilesAtPaths:inputPaths];
[SSZipArchive unzipFileAtPath:archivePath toDestination:outputPath delegate:self];
BOOL success = [SSZipArchive createZipFileAtPath:archivePath withFilesAtPaths:inputPaths];
XCTAssertTrue(success);
success = [SSZipArchive unzipFileAtPath:archivePath toDestination:outputPath delegate:self];
XCTAssertTrue(success);
NSDictionary *createdFileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[outputPath stringByAppendingPathComponent:@"Readme.markdown"] error:nil];
@@ -330,14 +382,15 @@
NSString *archivePath = [outputDir stringByAppendingPathComponent:@"TestAppArchive.zip"];
// Create the zip file using the contents of the .app file as the input
[SSZipArchive createZipFileAtPath:archivePath withContentsOfDirectory:inputFile];
BOOL success = [SSZipArchive createZipFileAtPath:archivePath withContentsOfDirectory:inputFile];
XCTAssertTrue(success);
/********** Un-zipping *******/
// Using this newly created zip file, unzip it
[SSZipArchive unzipFileAtPath:archivePath toDestination:outputDir];
success = [SSZipArchive unzipFileAtPath:archivePath toDestination:outputDir];
XCTAssertTrue(success);
// Get the path to the target file after unzipping
NSString *targetFilePath = [outputDir stringByAppendingPathComponent:@"/Contents/MacOS/TestProject"];
@@ -359,8 +412,8 @@
CancelDelegate *delegate = [[CancelDelegate alloc] init];
delegate.numFilesToUnzip = 1;
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:delegate];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:delegate];
XCTAssertFalse(success);
XCTAssertEqual(delegate.numFilesUnzipped, 1);
XCTAssertFalse(delegate.didUnzipArchive);
XCTAssertNotEqual(delegate.loaded, delegate.total);
@@ -370,8 +423,8 @@
delegate = [[CancelDelegate alloc] init];
delegate.numFilesToUnzip = 1000;
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:delegate];
success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:delegate];
XCTAssertTrue(success);
XCTAssertEqual(delegate.numFilesUnzipped, 2);
XCTAssertTrue(delegate.didUnzipArchive);
XCTAssertEqual(delegate.loaded, delegate.total);
@@ -385,16 +438,18 @@
// NSString *zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"LargeArchive" ofType:@"zip"];
// NSString *outputPath = [self _cachesPath:@"Large"];
//
// [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath];
// BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath];
// XCTAssertTrue(success);
//}
-(void)testShouldProvidePathOfUnzippedFileInDelegateCallback {
CollectingDelegate *collector = [CollectingDelegate new];
NSString *zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"TestArchive" ofType:@"zip"];
NSString *outputPath = [self _cachesPath:@"Regular"];
[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:collector];
NSString *outputPath = [self _cachesPath:@"Regular"];
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:collector];
XCTAssertTrue(success);
// STAssertEqualObjects([collector.files objectAtIndex:0], @"LICENSE.txt", nil);
// STAssertEqualObjects([collector.files objectAtIndex:1], @"README.md", nil);
}
@@ -434,7 +489,7 @@
#pragma mark - Private
- (NSString *)_cachesPath:(NSString *)directory {
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]
NSString *path = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).lastObject
stringByAppendingPathComponent:@"com.samsoffes.ssziparchive.tests"];
if (directory) {
path = [path stringByAppendingPathComponent:directory];

View File

@@ -3,16 +3,24 @@ source 'https://github.com/CocoaPods/Specs.git'
# inhibit_all_warnings!
use_frameworks!
def testing_pods
pod 'SSZipArchive', :path => '..'
end
abstract_target 'core' do
target 'ObjectiveCExample' do
testing_pods
platform :ios
end
pod 'SSZipArchive', :path => '..'
target 'ObjectiveCExample' do
platform :ios
end
target 'ObjectiveCExampleTests_iOS' do
platform :ios
end
target 'ObjectiveCExampleTests_macOS' do
platform :osx, '10.8'
end
target 'ObjectiveCExampleTests_tvOS' do
platform :tvos, '9.0'
end
target 'ObjectiveCExampleTests' do
testing_pods
platform :ios
end

View File

@@ -1,5 +1,5 @@
PODS:
- SSZipArchive (2.0.6)
- SSZipArchive (2.0.8)
DEPENDENCIES:
- SSZipArchive (from `..`)
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: ..
SPEC CHECKSUMS:
SSZipArchive: be986987cc955e02b89094337573689735cd1913
SSZipArchive: e6ab66e1936fac7e3b5073e9f5eb364d91dfbfc7
PODFILE CHECKSUM: 7f4058a9cbc69b4e63808729577a8bb2098bc527
PODFILE CHECKSUM: 5e250843c66c607960128ebfe02ab7d6569102be
COCOAPODS: 1.3.1

View File

@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'SSZipArchive'
s.version = '2.0.6'
s.version = '2.0.8'
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'
@@ -9,7 +9,7 @@ Pod::Spec.new do |s|
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.osx.deployment_target = '10.8'
s.watchos.deployment_target = '2.0'
s.source_files = 'SSZipArchive/*.{m,h}', 'SSZipArchive/minizip/*.{c,h}', 'SSZipArchive/minizip/aes/*.{c,h}'
s.public_header_files = 'SSZipArchive/*.h'

View File

@@ -30,14 +30,24 @@ typedef NS_ENUM(NSInteger, SSZipArchiveErrorCode) {
// Password check
+ (BOOL)isFilePasswordProtectedAtPath:(NSString *)path;
+ (BOOL)isPasswordValidForArchiveAtPath:(NSString *)path password:(NSString *)pw error:(NSError * __nullable * __nullable)error NS_SWIFT_NOTHROW;
+ (BOOL)isPasswordValidForArchiveAtPath:(NSString *)path password:(NSString *)pw error:(NSError * _Nullable * _Nullable)error NS_SWIFT_NOTHROW;
// Unzip
+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination;
+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination delegate:(nullable id<SSZipArchiveDelegate>)delegate;
+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination overwrite:(BOOL)overwrite password:(nullable NSString *)password error:(NSError * *)error;
+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination overwrite:(BOOL)overwrite password:(nullable NSString *)password error:(NSError * *)error delegate:(nullable id<SSZipArchiveDelegate>)delegate NS_REFINED_FOR_SWIFT;
+ (BOOL)unzipFileAtPath:(NSString *)path
toDestination:(NSString *)destination
overwrite:(BOOL)overwrite
password:(nullable NSString *)password
error:(NSError * *)error;
+ (BOOL)unzipFileAtPath:(NSString *)path
toDestination:(NSString *)destination
overwrite:(BOOL)overwrite
password:(nullable NSString *)password
error:(NSError * *)error
delegate:(nullable id<SSZipArchiveDelegate>)delegate NS_REFINED_FOR_SWIFT;
+ (BOOL)unzipFileAtPath:(NSString *)path
toDestination:(NSString *)destination
@@ -48,38 +58,43 @@ typedef NS_ENUM(NSInteger, SSZipArchiveErrorCode) {
delegate:(nullable id<SSZipArchiveDelegate>)delegate;
+ (BOOL)unzipFileAtPath:(NSString *)path
toDestination:(NSString *)destination
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler;
toDestination:(NSString *)destination
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler;
+ (BOOL)unzipFileAtPath:(NSString *)path
toDestination:(NSString *)destination
overwrite:(BOOL)overwrite
password:(nullable NSString *)password
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler;
toDestination:(NSString *)destination
overwrite:(BOOL)overwrite
password:(nullable NSString *)password
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler;
// Zip
// without password
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths;
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray<NSString *> *)paths;
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath;
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory;
// with password, password could be nil
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths withPassword:(nullable NSString *)password;
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray<NSString *> *)paths withPassword:(nullable NSString *)password;
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath withPassword:(nullable NSString *)password;
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(nullable NSString *)password;
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(nullable NSString *)password andProgressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler;
+ (BOOL)createZipFileAtPath:(NSString *)path
withContentsOfDirectory:(NSString *)directoryPath
keepParentDirectory:(BOOL)keepParentDirectory
withPassword:(nullable NSString *)password
andProgressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler;
- (instancetype)initWithPath:(NSString *)path;
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL open;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithPath:(NSString *)path NS_DESIGNATED_INITIALIZER;
- (BOOL)open;
- (BOOL)writeFile:(NSString *)path withPassword:(nullable NSString *)password;
- (BOOL)writeFolderAtPath:(NSString *)path withFolderName:(NSString *)folderName withPassword:(nullable NSString *)password;
- (BOOL)writeFileAtPath:(NSString *)path withFileName:(nullable NSString *)fileName withPassword:(nullable NSString *)password;
- (BOOL)writeData:(NSData *)data filename:(nullable NSString *)filename withPassword:(nullable NSString *)password;
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL close;
- (BOOL)close;
@end

View File

@@ -17,12 +17,23 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
#define CHUNK 16384
#ifndef API_AVAILABLE
// Xcode 7- compatibility
#define API_AVAILABLE(...)
#endif
@interface NSData(SSZipArchive)
- (NSString *)_base64RFC4648 API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
- (NSString *)_hexString;
@end
@interface SSZipArchive ()
+ (NSDate *)_dateWithMSDOSFormat:(UInt32)msdosDateTime;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
@end
@implementation SSZipArchive
{
/// path for zip file
NSString *_path;
zipFile _zip;
}
@@ -31,7 +42,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
+ (BOOL)isFilePasswordProtectedAtPath:(NSString *)path {
// Begin opening
zipFile zip = unzOpen([path fileSystemRepresentation]);
zipFile zip = unzOpen(path.fileSystemRepresentation);
if (zip == NULL) {
return NO;
}
@@ -64,7 +75,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
*error = nil;
}
zipFile zip = unzOpen([path fileSystemRepresentation]);
zipFile zip = unzOpen(path.fileSystemRepresentation);
if (zip == NULL) {
if (error) {
*error = [NSError errorWithDomain:SSZipArchiveErrorDomain
@@ -77,10 +88,10 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
int ret = unzGoToFirstFile(zip);
if (ret == UNZ_OK) {
do {
if ([pw length] == 0) {
if (pw.length == 0) {
ret = unzOpenCurrentFile(zip);
} else {
ret = unzOpenCurrentFilePassword(zip, [pw cStringUsingEncoding:NSASCIIStringEncoding]);
ret = unzOpenCurrentFilePassword(zip, [pw cStringUsingEncoding:NSUTF8StringEncoding]);
}
if (ret != UNZ_OK) {
if (ret != UNZ_BADPASSWORD) {
@@ -144,7 +155,12 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:YES password:nil error:nil delegate:delegate progressHandler:nil completionHandler:nil];
}
+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination overwrite:(BOOL)overwrite password:(nullable NSString *)password error:(NSError **)error delegate:(nullable id<SSZipArchiveDelegate>)delegate
+ (BOOL)unzipFileAtPath:(NSString *)path
toDestination:(NSString *)destination
overwrite:(BOOL)overwrite
password:(nullable NSString *)password
error:(NSError **)error
delegate:(nullable id<SSZipArchiveDelegate>)delegate
{
return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:overwrite password:password error:error delegate:delegate progressHandler:nil completionHandler:nil];
}
@@ -154,7 +170,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
overwrite:(BOOL)overwrite
password:(NSString *)password
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler
{
return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:overwrite password:password error:nil delegate:nil progressHandler:progressHandler completionHandler:completionHandler];
}
@@ -162,7 +178,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
+ (BOOL)unzipFileAtPath:(NSString *)path
toDestination:(NSString *)destination
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler
{
return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:YES password:nil error:nil delegate:nil progressHandler:progressHandler completionHandler:completionHandler];
}
@@ -186,11 +202,10 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
error:(NSError **)error
delegate:(id<SSZipArchiveDelegate>)delegate
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler
{
// Guard against empty strings
if ([path length] == 0 || [destination length] == 0)
if (path.length == 0 || destination.length == 0)
{
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: @"received invalid argument(s)"};
NSError *err = [NSError errorWithDomain:SSZipArchiveErrorDomain code:SSZipArchiveErrorCodeInvalidArguments userInfo:userInfo];
@@ -206,7 +221,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
}
// Begin opening
zipFile zip = unzOpen([path fileSystemRepresentation]);
zipFile zip = unzOpen(path.fileSystemRepresentation);
if (zip == NULL)
{
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: @"failed to open zip file"};
@@ -251,7 +266,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
int crc_ret = 0;
unsigned char buffer[4096] = {0};
NSFileManager *fileManager = [NSFileManager defaultManager];
NSMutableArray *directoriesModificationDates = [[NSMutableArray alloc] init];
NSMutableArray<NSDictionary *> *directoriesModificationDates = [[NSMutableArray alloc] init];
// Message delegate
if ([delegate respondsToSelector:@selector(zipArchiveWillUnzipArchiveAtPath:zipInfo:)]) {
@@ -265,10 +280,10 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
NSError *unzippingError;
do {
@autoreleasepool {
if ([password length] == 0) {
if (password.length == 0) {
ret = unzOpenCurrentFile(zip);
} else {
ret = unzOpenCurrentFilePassword(zip, [password cStringUsingEncoding:NSASCIIStringEncoding]);
ret = unzOpenCurrentFilePassword(zip, [password cStringUsingEncoding:NSUTF8StringEncoding]);
}
if (ret != UNZ_OK) {
@@ -339,16 +354,41 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
fileIsSymbolicLink = YES;
}
// Check if it contains directory
// NSString * strPath = @(filename);
NSString * strPath = [NSString stringWithCString:filename encoding:NSUTF8StringEncoding];
//if filename contains chinese dir transform Encoding
NSString * strPath = @(filename);
if (!strPath) {
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
strPath = [NSString stringWithCString:filename encoding:enc];
// if filename is non-unicode, detect and transform Encoding
NSData *data = [NSData dataWithBytes:(const void *)filename length:sizeof(unsigned char) * fileInfo.size_filename];
#ifdef __MAC_10_13
// Xcode 9+
if (@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)) {
#else
// Xcode 8-
if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber10_9_2) {
#endif
// supported encodings are in [NSString availableStringEncodings]
[NSString stringEncodingForData:data encodingOptions:nil convertedString:&strPath usedLossyConversion:nil];
} else {
// fallback to a simple manual detect for macOS 10.9 or older
NSArray<NSNumber *> *encodings = @[@(kCFStringEncodingGB_18030_2000), @(kCFStringEncodingShiftJIS)];
for (NSNumber *encoding in encodings) {
strPath = [NSString stringWithCString:filename encoding:(NSStringEncoding)CFStringConvertEncodingToNSStringEncoding(encoding.unsignedIntValue)];
if (strPath) {
break;
}
}
}
if (!strPath) {
// if filename encoding is non-detected, we default to something based on data
// _hexString is more readable than _base64RFC4648 for debugging unknown encodings
strPath = [data _hexString];
}
}
if (!strPath.length) {
// if filename data is unsalvageable, we default to currentFileNumber
strPath = @(currentFileNumber).stringValue;
}
//end by skyfox
// Check if it contains directory
BOOL isDirectory = NO;
if (filename[fileInfo.size_filename-1] == '/' || filename[fileInfo.size_filename-1] == '\\') {
isDirectory = YES;
@@ -371,7 +411,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
if (isDirectory) {
[fileManager createDirectoryAtPath:fullPath withIntermediateDirectories:YES attributes:directoryAttr error:&err];
} else {
[fileManager createDirectoryAtPath:[fullPath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:directoryAttr error:&err];
[fileManager createDirectoryAtPath:fullPath.stringByDeletingLastPathComponent withIntermediateDirectories:YES attributes:directoryAttr error:&err];
}
if (nil != err) {
if ([err.domain isEqualToString:NSCocoaErrorDomain] &&
@@ -395,7 +435,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
// ensure we are not creating stale file entries
int readBytes = unzReadCurrentFile(zip, buffer, 4096);
if (readBytes >= 0) {
FILE *fp = fopen([fullPath fileSystemRepresentation], "wb");
FILE *fp = fopen(fullPath.fileSystemRepresentation, "wb");
while (fp) {
if (readBytes > 0) {
if (0 == fwrite(buffer, readBytes, 1, fp)) {
@@ -414,9 +454,9 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
}
if (fp) {
if ([[[fullPath pathExtension] lowercaseString] isEqualToString:@"zip"]) {
NSLog(@"Unzipping nested .zip file: %@", [fullPath lastPathComponent]);
if ([self unzipFileAtPath:fullPath toDestination:[fullPath stringByDeletingLastPathComponent] overwrite:overwrite password:password error:nil delegate:nil]) {
if ([fullPath.pathExtension.lowercaseString isEqualToString:@"zip"]) {
NSLog(@"Unzipping nested .zip file: %@", fullPath.lastPathComponent);
if ([self unzipFileAtPath:fullPath toDestination:fullPath.stringByDeletingLastPathComponent overwrite:overwrite password:password error:nil delegate:nil]) {
[[NSFileManager defaultManager] removeItemAtPath:fullPath error:nil];
}
}
@@ -476,12 +516,12 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
else
{
// Assemble the path for the symbolic link
NSMutableString* destinationPath = [NSMutableString string];
NSMutableString *destinationPath = [NSMutableString string];
int bytesRead = 0;
while ((bytesRead = unzReadCurrentFile(zip, buffer, 4096)) > 0)
{
buffer[bytesRead] = (int)0;
[destinationPath appendString:@((const char*)buffer)];
[destinationPath appendString:@((const char *)buffer)];
}
// Check if the symlink exists and delete it if we're overwriting
@@ -553,7 +593,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
NSLog(@"[SSZipArchive] Set attributes failed for directory: %@.", d[@"path"]);
}
if (err) {
NSLog(@"[SSZipArchive] Error setting directory file modification date attribute: %@",err.localizedDescription);
NSLog(@"[SSZipArchive] Error setting directory file modification date attribute: %@", err.localizedDescription);
}
}
}
@@ -596,7 +636,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
}
#pragma mark - Zipping
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray<NSString *> *)paths
{
return [SSZipArchive createZipFileAtPath:path withFilesAtPaths:paths withPassword:nil];
}
@@ -608,7 +648,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
return [SSZipArchive createZipFileAtPath:path withContentsOfDirectory:directoryPath keepParentDirectory:keepParentDirectory withPassword:nil];
}
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths withPassword:(NSString *)password
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray<NSString *> *)paths withPassword:(NSString *)password
{
SSZipArchive *zipArchive = [[SSZipArchive alloc] initWithPath:path];
BOOL success = [zipArchive open];
@@ -635,7 +675,11 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
];
}
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(nullable NSString *)password andProgressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler {
+ (BOOL)createZipFileAtPath:(NSString *)path
withContentsOfDirectory:(NSString *)directoryPath
keepParentDirectory:(BOOL)keepParentDirectory
withPassword:(nullable NSString *)password
andProgressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler {
SSZipArchive *zipArchive = [[SSZipArchive alloc] initWithPath:path];
BOOL success = [zipArchive open];
@@ -643,7 +687,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
// use a local fileManager (queue/thread compatibility)
NSFileManager *fileManager = [[NSFileManager alloc] init];
NSDirectoryEnumerator *dirEnumerator = [fileManager enumeratorAtPath:directoryPath];
NSArray *allObjects = dirEnumerator.allObjects;
NSArray<NSString *> *allObjects = dirEnumerator.allObjects;
NSUInteger total = allObjects.count, complete = 0;
NSString *fileName;
for (fileName in allObjects) {
@@ -653,7 +697,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
if (keepParentDirectory)
{
fileName = [[directoryPath lastPathComponent] stringByAppendingPathComponent:fileName];
fileName = [directoryPath.lastPathComponent stringByAppendingPathComponent:fileName];
}
if (!isDir) {
@@ -678,7 +722,10 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
return success;
}
// disabling `init` because designated initializer is `initWithPath:`
- (instancetype)init { @throw nil; }
// designated initializer
- (instancetype)initWithPath:(NSString *)path
{
if ((self = [super init])) {
@@ -690,28 +737,26 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
- (BOOL)open
{
NSAssert((_zip == NULL), @"Attempting open an archive which is already open");
_zip = zipOpen([_path fileSystemRepresentation], APPEND_STATUS_CREATE);
NSAssert((_zip == NULL), @"Attempting to open an archive which is already open");
_zip = zipOpen(_path.fileSystemRepresentation, APPEND_STATUS_CREATE);
return (NULL != _zip);
}
- (void)zipInfo:(zip_fileinfo*)zipInfo setDate:(NSDate*)date
- (void)zipInfo:(zip_fileinfo *)zipInfo setDate:(NSDate *)date
{
NSCalendar *currentCalendar = [NSCalendar currentCalendar];
#if defined(__IPHONE_8_0) || defined(__MAC_10_10)
NSCalendar *currentCalendar = SSZipArchive._gregorian;
NSCalendarUnit flags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond;
#else
uint flags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit;
#endif
NSDateComponents *components = [currentCalendar components:flags fromDate:date];
struct tm tmz_date;
tmz_date.tm_sec = (unsigned int)components.second;
tmz_date.tm_min = (unsigned int)components.minute;
tmz_date.tm_hour = (unsigned int)components.hour;
tmz_date.tm_mday = (unsigned int)components.day;
// ISO/IEC 9899 struct tm is 0-indexed for January but NSDateComponents for gregorianCalendar is 1-indexed for January
tmz_date.tm_mon = (unsigned int)components.month - 1;
tmz_date.tm_year = (unsigned int)components.year;
// ISO/IEC 9899 struct tm is 0-indexed for AD 1900 but NSDateComponents for gregorianCalendar is 1-indexed for AD 1
tmz_date.tm_year = (unsigned int)components.year - 1900;
zipInfo->dos_date = tm_to_dosdate(&tmz_date);
}
@@ -751,8 +796,8 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
}
unsigned int len = 0;
zipOpenNewFileInZip3(_zip, [[folderName stringByAppendingString:@"/"] fileSystemRepresentation], &zipInfo, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_NO_COMPRESSION, 0, -MAX_WBITS, DEF_MEM_LEVEL,
Z_DEFAULT_STRATEGY, [password UTF8String], 0);
zipOpenNewFileInZip3(_zip, [folderName stringByAppendingString:@"/"].fileSystemRepresentation, &zipInfo, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_NO_COMPRESSION, 0, -MAX_WBITS, DEF_MEM_LEVEL,
Z_DEFAULT_STRATEGY, password.UTF8String, 0);
zipWriteInFileInZip(_zip, &len, 0);
zipCloseFileInZip(_zip);
return YES;
@@ -770,17 +815,17 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
{
NSAssert((_zip != NULL), @"Attempting to write to an archive which was never opened");
FILE *input = fopen([path fileSystemRepresentation], "r");
FILE *input = fopen(path.fileSystemRepresentation, "r");
if (NULL == input) {
return NO;
}
const char *aFileName;
if (!fileName) {
aFileName = [path.lastPathComponent fileSystemRepresentation];
aFileName = path.lastPathComponent.fileSystemRepresentation;
}
else {
aFileName = [fileName fileSystemRepresentation];
aFileName = fileName.fileSystemRepresentation;
}
zip_fileinfo zipInfo = {0,0,0};
@@ -820,7 +865,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
return NO;
}
zipOpenNewFileInZip3(_zip, aFileName, &zipInfo, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION, 0, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, [password UTF8String], 0);
zipOpenNewFileInZip3(_zip, aFileName, &zipInfo, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION, 0, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, password.UTF8String, 0);
unsigned int len = 0;
while (!feof(input) && !ferror(input))
@@ -846,7 +891,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
zip_fileinfo zipInfo = {0,0,0};
[self zipInfo:&zipInfo setDate:[NSDate date]];
zipOpenNewFileInZip3(_zip, [filename fileSystemRepresentation], &zipInfo, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION, 0, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, [password UTF8String], 0);
zipOpenNewFileInZip3(_zip, filename.fileSystemRepresentation, &zipInfo, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION, 0, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, password.UTF8String, 0);
zipWriteInFileInZip(_zip, data.bytes, (unsigned int)data.length);
@@ -871,7 +916,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
static NSString *discardableFilePath = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *temporaryDirectoryName = [[NSUUID UUID] UUIDString];
NSString *temporaryDirectoryName = [NSUUID UUID].UUIDString;
NSString *temporaryDirectory = [NSTemporaryDirectory() stringByAppendingPathComponent:temporaryDirectoryName];
BOOL directoryCreated = [[NSFileManager defaultManager] createDirectoryAtPath:temporaryDirectory withIntermediateDirectories:YES attributes:nil error:nil];
if (directoryCreated) {
@@ -882,6 +927,17 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
return discardableFilePath;
}
+ (NSCalendar *)_gregorian
{
static NSCalendar *gregorian;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
});
return gregorian;
}
// 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
@@ -891,6 +947,11 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
// 7423 = 0111 0100 0010 0011 - 01110 100001 00011 = 14 33 3 = 14:33:06
+ (NSDate *)_dateWithMSDOSFormat:(UInt32)msdosDateTime
{
/*
// the whole `_dateWithMSDOSFormat:` method is equivalent but faster than this one line,
// essentially because `mktime` is slow:
NSDate *date = [NSDate dateWithTimeIntervalSince1970:dosdate_to_time_t(msdosDateTime)];
*/
static const UInt32 kYearMask = 0xFE000000;
static const UInt32 kMonthMask = 0x1E00000;
static const UInt32 kDayMask = 0x1F0000;
@@ -898,29 +959,60 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
static const UInt32 kMinuteMask = 0x7E0;
static const UInt32 kSecondMask = 0x1F;
static NSCalendar *gregorian;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
#if defined(__IPHONE_8_0) || defined(__MAC_10_10)
gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
#else
gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
#endif
});
NSAssert(0xFFFFFFFF == (kYearMask | kMonthMask | kDayMask | kHourMask | kMinuteMask | kSecondMask), @"[SSZipArchive] MSDOS date masks don't add up");
NSDateComponents *components = [[NSDateComponents alloc] init];
NSAssert(0xFFFFFFFF == (kYearMask | kMonthMask | kDayMask | kHourMask | kMinuteMask | kSecondMask), @"[SSZipArchive] MSDOS date masks don't add up");
components.year = 1980 + ((msdosDateTime & kYearMask) >> 25);
components.month = (msdosDateTime & kMonthMask) >> 21;
components.day = (msdosDateTime & kDayMask) >> 16;
components.hour = (msdosDateTime & kHourMask) >> 11;
components.minute = (msdosDateTime & kMinuteMask) >> 5;
components.second = (msdosDateTime & kSecondMask) * 2;
[components setYear:1980 + ((msdosDateTime & kYearMask) >> 25)];
[components setMonth:(msdosDateTime & kMonthMask) >> 21];
[components setDay:(msdosDateTime & kDayMask) >> 16];
[components setHour:(msdosDateTime & kHourMask) >> 11];
[components setMinute:(msdosDateTime & kMinuteMask) >> 5];
[components setSecond:(msdosDateTime & kSecondMask) * 2];
NSDate *date = [NSDate dateWithTimeInterval:0 sinceDate:[gregorian dateFromComponents:components]];
NSDate *date = [self._gregorian dateFromComponents:components];
return date;
}
@end
#pragma mark - Private tools for unreadable data
@implementation NSData (SSZipArchive)
// `base64EncodedStringWithOptions` uses a base64 alphabet with '+' and '/'.
// we got those alternatives to make it compatible with filenames: https://en.wikipedia.org/wiki/Base64
// * modified Base64 encoding for IMAP mailbox names (RFC 3501): uses '+' and ','
// * modified Base64 for URL and filenames (RFC 4648): uses '-' and '_'
- (NSString *)_base64RFC4648
{
NSString *strName = [self base64EncodedStringWithOptions:0];
strName = [strName stringByReplacingOccurrencesOfString:@"+" withString:@"-"];
strName = [strName stringByReplacingOccurrencesOfString:@"/" withString:@"_"];
return strName;
}
// initWithBytesNoCopy from NSProgrammer, Jan 25 '12: https://stackoverflow.com/a/9009321/1033581
// hexChars from Peter, Aug 19 '14: https://stackoverflow.com/a/25378464/1033581
// not implemented as too lengthy: a potential mapping improvement from Moose, Nov 3 '15: https://stackoverflow.com/a/33501154/1033581
- (NSString *)_hexString
{
const char *hexChars = "0123456789ABCDEF";
NSUInteger length = self.length;
const unsigned char *bytes = self.bytes;
char *chars = malloc(length * 2);
char *s = chars;
NSUInteger i = length;
while (i--) {
*s++ = hexChars[*bytes >> 4];
*s++ = hexChars[*bytes & 0xF];
bytes++;
}
NSString *str = [[NSString alloc] initWithBytesNoCopy:chars
length:length * 2
encoding:NSASCIIStringEncoding
freeWhenDone:YES];
return str;
}
@end

View File

@@ -42,9 +42,13 @@ INLINE int has_aes_ni(void)
#elif defined( __GNUC__ )
#include <cpuid.h>
#if !defined(__clang__)
#pragma GCC target ("ssse3")
#pragma GCC target ("sse4.1")
#pragma GCC target ("aes")
#endif
#include <x86intrin.h>
#define INLINE static __inline

View File

@@ -30,7 +30,8 @@ Issue Date: 20/12/2007
#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ )
# include <sys/endian.h>
#elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \
defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ )
defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ ) || \
defined(__pnacl__)
# include <machine/endian.h>
#elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ )
# if !defined( __MINGW32__ ) && !defined( _AIX )

View File

@@ -36,7 +36,7 @@
*/
#include <memory.h>
#include <string.h>
#include "fileenc.h"

View File

@@ -24,7 +24,7 @@ This is an implementation of HMAC, the FIPS standard keyed hash function
#define _HMAC2_H
#include <stdlib.h>
#include <memory.h>
#include <string.h>
#if defined(__cplusplus)
extern "C"

View File

@@ -38,7 +38,7 @@
its location in memory.
*/
#include <memory.h>
#include <string.h>
#include "prng.h"
#if defined(__cplusplus)

View File

@@ -21,7 +21,7 @@ This is an implementation of RFC2898, which specifies key derivation from
a password and a salt value.
*/
#include <memory.h>
#include <string.h>
#include "hmac.h"
#if defined(__cplusplus)

View File

@@ -1,9 +1,12 @@
/* crypt.c -- base code for traditional PKWARE encryption
Version 1.01e, February 12th, 2005
Version 1.2.0, September 16th, 2017
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
Copyright (C) 1998-2005 Gilles Vollant
Modifications for Info-ZIP crypting
Copyright (C) 2003 Terry Thorsen
Modifications for Info-ZIP crypting
http://www.winimage.com/zLibDll/minizip.html
Copyright (C) 2003 Terry Thorsen
This code is a modified version of crypting code in Info-ZIP distribution
@@ -129,7 +132,7 @@ int cryptrand(unsigned char *buf, unsigned int len)
return rlen;
}
int crypthead(const char *passwd, uint8_t *buf, int buf_size, uint32_t *pkeys,
int crypthead(const char *passwd, uint8_t *buf, int buf_size, uint32_t *pkeys,
const z_crc_t *pcrc_32_tab, uint8_t verify1, uint8_t verify2)
{
uint8_t n = 0; /* index in random header */

View File

@@ -1,9 +1,12 @@
/* crypt.h -- base code for traditional PKWARE encryption
Version 1.01e, February 12th, 2005
Version 1.2.0, September 16th, 2017
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
Copyright (C) 1998-2005 Gilles Vollant
Modifications for Info-ZIP crypting
Copyright (C) 2003 Terry Thorsen
Modifications for Info-ZIP crypting
http://www.winimage.com/zLibDll/minizip.html
Copyright (C) 2003 Terry Thorsen
This code is a modified version of crypting code in Info-ZIP distribution
@@ -49,7 +52,7 @@ void init_keys(const char *passwd, uint32_t *pkeys, const z_crc_t *pcrc_32_tab);
int cryptrand(unsigned char *buf, unsigned int len);
/* Create encryption header */
int crypthead(const char *passwd, uint8_t *buf, int buf_size, uint32_t *pkeys,
int crypthead(const char *passwd, uint8_t *buf, int buf_size, uint32_t *pkeys,
const z_crc_t *pcrc_32_tab, uint8_t verify1, uint8_t verify2);
/***************************************************************************/

View File

@@ -1,11 +1,13 @@
/* ioapi.c -- IO base function header for compress/uncompress .zip
part of the MiniZip project
Copyright (C) 1998-2010 Gilles Vollant
http://www.winimage.com/zLibDll/minizip.html
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
Modifications for Zip64 support
Copyright (C) 2009-2010 Mathias Svensson
http://result42.com
Copyright (C) 1998-2010 Gilles Vollant
http://www.winimage.com/zLibDll/minizip.html
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.

View File

@@ -1,11 +1,13 @@
/* ioapi.h -- IO base function header for compress/uncompress .zip
part of the MiniZip project
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
Copyright (C) 2009-2010 Mathias Svensson
Modifications for Zip64 support
http://result42.com
Copyright (C) 1998-2010 Gilles Vollant
http://www.winimage.com/zLibDll/minizip.html
Modifications for Zip64 support
Copyright (C) 2009-2010 Mathias Svensson
http://result42.com
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.
@@ -25,7 +27,7 @@
# define ftello64 ftell
# define fseeko64 fseek
#else
# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__APPLE__)
# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__ANDROID__)
# define fopen64 fopen
# define ftello64 ftello
# define fseeko64 fseeko

View File

@@ -3,8 +3,8 @@
This version of ioapi is designed to buffer IO.
Copyright (C) 1998-2003 Gilles Vollant
(C) 2012-2014 Nathan Moinvaziri
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.
@@ -23,7 +23,7 @@
#ifndef IOBUF_BUFFERSIZE
# define IOBUF_BUFFERSIZE (UINT16_MAX)
#endif
#endif
#if defined(_WIN32)
# include <conio.h>
@@ -73,7 +73,7 @@ typedef struct ourstream_s {
# define print_buf(o,s,f,...) print_buf_internal(o,s,f,__VA_ARGS__);
#else
# define print_buf(o,s,f,...)
#endif
#endif
void print_buf_internal(voidpf opaque, voidpf stream, char *format, ...)
{
@@ -137,7 +137,7 @@ long fflush_buf(voidpf opaque, voidpf stream)
uint32_t bytes_to_write = streamio->writebuf_len;
uint32_t bytes_left_to_write = streamio->writebuf_len;
long bytes_written = 0;
while (bytes_left_to_write > 0)
{
if (bufio->filefunc64.zwrite_file != NULL)
@@ -264,7 +264,7 @@ uint32_t ZCALLBACK fwrite_buf_func(voidpf opaque, voidpf stream, const void *buf
continue;
}
memcpy(streamio->writebuf + streamio->writebuf_pos, (char *)buf + (bytes_to_write - bytes_left_to_write), bytes_to_copy);
print_buf(opaque, stream, "write copy [remaining %d write %d:%d len %d]\n", bytes_to_copy, bytes_to_write, bytes_left_to_write, streamio->writebuf_len);
@@ -344,7 +344,7 @@ int fseek_buf_internal_func(voidpf opaque, voidpf stream, uint64_t offset, int o
{
streamio->readbuf_pos += (uint32_t)offset;
return 0;
}
}
offset -= (streamio->readbuf_len - streamio->readbuf_pos);
streamio->position += offset;
}
@@ -419,7 +419,7 @@ int ZCALLBACK fclose_buf_func(voidpf opaque, voidpf stream)
print_buf(opaque, stream, "write efficency %.02f%%\n", (streamio->writebuf_hits / ((float)streamio->writebuf_hits + streamio->writebuf_misses)) * 100);
if (bufio->filefunc64.zclose_file != NULL)
ret = bufio->filefunc64.zclose_file(bufio->filefunc64.opaque, streamio->stream);
else
else
ret = bufio->filefunc.zclose_file(bufio->filefunc.opaque, streamio->stream);
free(streamio);
return ret;

View File

@@ -3,8 +3,8 @@
This version of ioapi is designed to buffer IO.
Copyright (C) 1998-2003 Gilles Vollant
(C) 2012-2014 Nathan Moinvaziri
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.

View File

@@ -11,8 +11,11 @@
Based on Unzip ioapi.c version 0.22, May 19th, 2003
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
Copyright (C) 2003 Justin Fletcher
Copyright (C) 1998-2003 Gilles Vollant
(C) 2003 Justin Fletcher
http://www.winimage.com/zLibDll/minizip.html
This file is under the same license as the Unzip tool it is distributed
with.
@@ -30,14 +33,14 @@
#ifndef IOMEM_BUFFERSIZE
# define IOMEM_BUFFERSIZE (UINT16_MAX)
#endif
#endif
voidpf ZCALLBACK fopen_mem_func(voidpf opaque, const char *filename, int mode)
{
ourmemory_t *mem = (ourmemory_t *)opaque;
if (mem == NULL)
return NULL; /* Mem structure passed in was null */
if (mode & ZLIB_FILEFUNC_MODE_CREATE)
{
if (mem->grow)
@@ -128,7 +131,7 @@ long ZCALLBACK fseek_mem_func(voidpf opaque, voidpf stream, uint32_t offset, int
case ZLIB_FILEFUNC_SEEK_SET:
new_pos = offset;
break;
default:
default:
return -1;
}

View File

@@ -4,8 +4,9 @@
This version of ioapi is designed to access memory rather than files.
We do use a region of memory to put data in to and take it out of.
Copyright (C) 1998-2003 Gilles Vollant
Copyright (C) 2012-2017 Nathan Moinvaziri (https://github.com/nmoinvaz/minizip)
(C) 2003 Justin Fletcher
(C) 1998-2003 Gilles Vollant
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.

View File

@@ -58,7 +58,7 @@ uint32_t get_file_date(const char *path, uint32_t *dos_date)
if (name[len - 1] == '/')
name[len - 1] = 0;
/* not all systems allow stat'ing a file with / appended */
/* Not all systems allow stat'ing a file with / appended */
if (stat(name, &s) == 0)
{
tm_t = s.st_mtime;
@@ -90,75 +90,81 @@ void change_file_date(const char *path, uint32_t dos_date)
}
#else
struct utimbuf ut;
struct tm newdate;
dosdate_to_tm(dos_date, &newdate);
ut.actime = ut.modtime = mktime(&newdate);
ut.actime = ut.modtime = dosdate_to_time_t(dos_date);
utime(path, &ut);
#endif
}
int dosdate_to_tm(uint64_t dos_date, struct tm *ptm)
int invalid_date(const struct tm *ptm)
{
#define datevalue_in_range(min, max, value) ((min) <= (value) && (value) <= (max))
return (!datevalue_in_range(0, 207, ptm->tm_year) ||
!datevalue_in_range(0, 11, ptm->tm_mon) ||
!datevalue_in_range(1, 31, ptm->tm_mday) ||
!datevalue_in_range(0, 23, ptm->tm_hour) ||
!datevalue_in_range(0, 59, ptm->tm_min) ||
!datevalue_in_range(0, 59, ptm->tm_sec));
#undef datevalue_in_range
}
// Conversion without validation
void dosdate_to_raw_tm(uint64_t dos_date, struct tm *ptm)
{
uint64_t date = (uint64_t)(dos_date >> 16);
ptm->tm_mday = (uint16_t)(date & 0x1f);
ptm->tm_mon = (uint16_t)(((date & 0x1E0) / 0x20) - 1);
ptm->tm_year = (uint16_t)(((date & 0x0FE00) / 0x0200) + 1980);
ptm->tm_year = (uint16_t)(((date & 0x0FE00) / 0x0200) + 80);
ptm->tm_hour = (uint16_t)((dos_date & 0xF800) / 0x800);
ptm->tm_min = (uint16_t)((dos_date & 0x7E0) / 0x20);
ptm->tm_sec = (uint16_t)(2 * (dos_date & 0x1f));
ptm->tm_isdst = -1;
#define datevalue_in_range(min, max, value) ((min) <= (value) && (value) <= (max))
if (!datevalue_in_range(0, 11, ptm->tm_mon) ||
!datevalue_in_range(1, 31, ptm->tm_mday) ||
!datevalue_in_range(0, 23, ptm->tm_hour) ||
!datevalue_in_range(0, 59, ptm->tm_min) ||
!datevalue_in_range(0, 59, ptm->tm_sec))
}
int dosdate_to_tm(uint64_t dos_date, struct tm *ptm)
{
dosdate_to_raw_tm(dos_date, ptm);
if (invalid_date(ptm))
{
/* Invalid date stored, so don't return it. */
// Invalid date stored, so don't return it.
memset(ptm, 0, sizeof(struct tm));
return -1;
}
#undef datevalue_in_range
return 0;
}
time_t dosdate_to_time_t(uint64_t dos_date)
{
struct tm ptm;
dosdate_to_raw_tm(dos_date, &ptm);
return mktime(&ptm);
}
uint32_t tm_to_dosdate(const struct tm *ptm)
{
uint32_t year = 0;
struct tm fixed_tm;
#define datevalue_in_range(min, max, value) ((min) <= (value) && (value) <= (max))
/* Years supported:
* [00, 79] (assumed to be between 2000 and 2079)
* [80, 207] (assumed to be between 1980 and 2107, typical output of old
software that does 'year-1900' to get a double digit year)
* [1980, 2107]
Due to the date format limitations, only years between 1980 and 2107 can be stored.
* [00, 79] (assumed to be between 2000 and 2079)
* [80, 207] (assumed to be between 1980 and 2107, typical output of old
software that does 'year-1900' to get a double digit year)
* [1980, 2107] (due to the date format limitations, only years between 1980 and 2107 can be stored.)
*/
if (!(datevalue_in_range(1980, 2107, ptm->tm_year) || datevalue_in_range(0, 207, ptm->tm_year)) ||
!datevalue_in_range(0, 11, ptm->tm_mon) ||
!datevalue_in_range(1, 31, ptm->tm_mday) ||
!datevalue_in_range(0, 23, ptm->tm_hour) ||
!datevalue_in_range(0, 59, ptm->tm_min) ||
!datevalue_in_range(0, 59, ptm->tm_sec))
{
return 0;
}
#undef datevalue_in_range
year = (uint32_t)ptm->tm_year;
if (year >= 1980) /* range [1980, 2107] */
year -= 1980;
else if (year >= 80) /* range [80, 99] */
year -= 80;
memcpy(&fixed_tm, ptm, sizeof(struct tm));
if (fixed_tm.tm_year >= 1980) /* range [1980, 2107] */
fixed_tm.tm_year -= 1980;
else if (fixed_tm.tm_year >= 80) /* range [80, 99] */
fixed_tm.tm_year -= 80;
else /* range [00, 79] */
year += 20;
fixed_tm.tm_year += 20;
return (uint32_t)(((ptm->tm_mday) + (32 * (ptm->tm_mon + 1)) + (512 * year)) << 16) |
((ptm->tm_sec / 2) + (32 * ptm->tm_min) + (2048 * (uint32_t)ptm->tm_hour));
if (invalid_date(ptm))
return 0;
return (uint32_t)(((fixed_tm.tm_mday) + (32 * (fixed_tm.tm_mon + 1)) + (512 * fixed_tm.tm_year)) << 16) |
((fixed_tm.tm_sec / 2) + (32 * fixed_tm.tm_min) + (2048 * (uint32_t)fixed_tm.tm_hour));
}
int makedir(const char *newdir)
@@ -214,9 +220,28 @@ int makedir(const char *newdir)
return 1;
}
FILE *get_file_handle(const char *path)
{
FILE *handle = NULL;
#if defined(WIN32)
wchar_t *pathWide = NULL;
int pathLength = 0;
pathLength = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0) + 1;
pathWide = (wchar_t*)calloc(pathLength, sizeof(wchar_t));
MultiByteToWideChar(CP_UTF8, 0, path, -1, pathWide, pathLength);
handle = _wfopen((const wchar_t*)pathWide, L"rb");
free(pathWide);
#else
handle = fopen64(path, "rb");
#endif
return handle;
}
int check_file_exists(const char *path)
{
FILE* handle = fopen64(path, "rb");
FILE *handle = get_file_handle(path);
if (handle == NULL)
return 0;
fclose(handle);
@@ -225,9 +250,10 @@ int check_file_exists(const char *path)
int is_large_file(const char *path)
{
FILE* handle = NULL;
uint64_t pos = 0;
FILE* handle = fopen64(path, "rb");
handle = get_file_handle(path);
if (handle == NULL)
return 0;

View File

@@ -24,6 +24,9 @@ void change_file_date(const char *path, uint32_t dos_date);
/* Convert dos date/time format to struct tm */
int dosdate_to_tm(uint64_t dos_date, struct tm *ptm);
/* Convert dos date/time format to time_t */
time_t dosdate_to_time_t(uint64_t dos_date);
/* Convert struct tm to dos date/time format */
uint32_t tm_to_dosdate(const struct tm *ptm);

View File

@@ -1,16 +1,17 @@
/* unzip.c -- IO for uncompress .zip files using zlib
Version 1.1, February 14h, 2010
Version 1.2.0, September 16th, 2017
part of the MiniZip project
Copyright (C) 2010-2017 Nathan Moinvaziri
Modifications for AES, PKWARE disk spanning
https://github.com/nmoinvaz/minizip
Copyright (C) 2009-2010 Mathias Svensson
Modifications for Zip64 support on both zip and unzip
http://result42.com
Copyright (C) 2007-2008 Even Rouault
Modifications of Unzip for Zip64
Copyright (C) 1998-2010 Gilles Vollant
http://www.winimage.com/zLibDll/minizip.html
Modifications of Unzip for Zip64
Copyright (C) 2007-2008 Even Rouault
Modifications for Zip64 support on both zip and unzip
Copyright (C) 2009-2010 Mathias Svensson
http://result42.com
Modifications for AES, PKWARE disk spanning
Copyright (C) 2010-2014 Nathan Moinvaziri
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.
@@ -73,8 +74,7 @@
# define TRYFREE(p) {if (p) free(p);}
#endif
const char unz_copyright[] =
" unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
const char unz_copyright[] = " unzip 1.2.0 Copyright 1998-2017 - https://github.com/nmoinvaz/minizip";
/* unz_file_info_internal contain internal info about a file in zipfile*/
typedef struct unz_file_info64_internal_s
@@ -111,7 +111,7 @@ typedef struct
uint64_t total_out_64;
uint32_t crc32; /* crc32 of all data uncompressed */
uint32_t crc32_wait; /* crc32 we must obtain after decompress all */
uint32_t crc32_expected; /* crc32 we must obtain after decompress all */
uint64_t rest_read_compressed; /* number of byte to be decompressed */
uint64_t rest_read_uncompressed; /* number of byte to be obtained after decomp */
@@ -153,7 +153,7 @@ typedef struct
uint32_t keys[3]; /* keys defining the pseudo-random sequence */
const z_crc_t *pcrc_32_tab;
#endif
} unz64_s;
} unz64_internal;
/* Read a byte from a gz_stream; Return EOF for end of file. */
static int unzReadUInt8(const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, uint8_t *value)
@@ -343,8 +343,8 @@ static uint64_t unzSearchCentralDir64(const zlib_filefunc64_32_def *pzlib_filefu
static unzFile unzOpenInternal(const void *path, zlib_filefunc64_32_def *pzlib_filefunc64_32_def)
{
unz64_s us;
unz64_s *s = NULL;
unz64_internal us;
unz64_internal *s = NULL;
uint64_t central_pos = 0;
uint64_t central_pos64 = 0;
uint64_t number_entry_CD = 0;
@@ -354,9 +354,6 @@ static unzFile unzOpenInternal(const void *path, zlib_filefunc64_32_def *pzlib_f
voidpf filestream = NULL;
int err = UNZ_OK;
if (unz_copyright[0] != ' ')
return NULL;
us.filestream = NULL;
us.filestream_with_CD = NULL;
us.z_filefunc.zseek32_file = NULL;
@@ -493,7 +490,7 @@ static unzFile unzOpenInternal(const void *path, zlib_filefunc64_32_def *pzlib_f
us.central_pos = central_pos;
us.pfile_in_zip_read = NULL;
s = (unz64_s*)ALLOC(sizeof(unz64_s));
s = (unz64_internal*)ALLOC(sizeof(unz64_internal));
if (s != NULL)
{
*s = us;
@@ -538,10 +535,10 @@ extern unzFile ZEXPORT unzOpen64(const void *path)
extern int ZEXPORT unzClose(unzFile file)
{
unz64_s *s;
unz64_internal *s;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (s->pfile_in_zip_read != NULL)
unzCloseCurrentFile(file);
@@ -560,10 +557,10 @@ extern int ZEXPORT unzClose(unzFile file)
/* Goto to the next available disk for spanned archives */
static int unzGoToNextDisk(unzFile file)
{
unz64_s *s;
unz64_internal *s;
uint32_t number_disk_next = 0;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (s == NULL)
return UNZ_PARAMERROR;
number_disk_next = s->number_disk;
@@ -602,10 +599,10 @@ static int unzGoToNextDisk(unzFile file)
extern int ZEXPORT unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info32)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
pglobal_info32->number_entry = (uint32_t)s->gi.number_entry;
pglobal_info32->size_comment = s->gi.size_comment;
@@ -615,21 +612,21 @@ extern int ZEXPORT unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info3
extern int ZEXPORT unzGetGlobalInfo64(unzFile file, unz_global_info64 *pglobal_info)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
*pglobal_info = s->gi;
return UNZ_OK;
}
extern int ZEXPORT unzGetGlobalComment(unzFile file, char *comment, uint16_t comment_size)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
uint16_t bytes_to_read = comment_size;
if (file == NULL)
return (int)UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (bytes_to_read > s->gi.size_comment)
bytes_to_read = s->gi.size_comment;
@@ -652,13 +649,13 @@ extern int ZEXPORT unzGetGlobalComment(unzFile file, char *comment, uint16_t com
static int unzGetCurrentFileInfoField(unzFile file, uint32_t *seek, void *field, uint16_t field_size, uint16_t size_file_field, int null_terminated_field)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
uint32_t bytes_to_read = 0;
int err = UNZ_OK;
if (file == NULL)
return (int)UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
/* Read field */
if (field != NULL)
@@ -701,7 +698,7 @@ static int unzGetCurrentFileInfoInternal(unzFile file, unz_file_info64 *pfile_in
unz_file_info64_internal *pfile_info_internal, char *filename, uint16_t filename_size, void *extrafield,
uint16_t extrafield_size, char *comment, uint16_t comment_size)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
unz_file_info64 file_info;
unz_file_info64_internal file_info_internal;
uint32_t magic = 0;
@@ -717,7 +714,7 @@ static int unzGetCurrentFileInfoInternal(unzFile file, unz_file_info64 *pfile_in
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (ZSEEK64(s->z_filefunc, s->filestream_with_CD,
s->pos_in_central_dir + s->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0)
@@ -941,7 +938,7 @@ extern int ZEXPORT unzGetCurrentFileInfo64(unzFile file, unz_file_info64 * pfile
/* Read the local header of the current zipfile. Check the coherency of the local header and info in the
end of central directory about this file store in *piSizeVar the size of extra info in local header
(filename and size of extra field data) */
static int unzCheckCurrentFileCoherencyHeader(unz64_s *s, uint32_t *psize_variable, uint64_t *poffset_local_extrafield,
static int unzCheckCurrentFileCoherencyHeader(unz64_internal *s, uint32_t *psize_variable, uint64_t *poffset_local_extrafield,
uint16_t *psize_local_extrafield)
{
uint32_t magic = 0;
@@ -1019,8 +1016,6 @@ static int unzCheckCurrentFileCoherencyHeader(unz64_s *s, uint32_t *psize_variab
err = UNZ_BADZIPFILE;
if (unzReadUInt16(&s->z_filefunc, s->filestream, &size_filename) != UNZ_OK)
err = UNZ_ERRNO;
else if ((err == UNZ_OK) && (size_filename != s->cur_file_info.size_filename))
err = UNZ_BADZIPFILE;
*psize_variable += size_filename;
@@ -1040,7 +1035,7 @@ static int unzCheckCurrentFileCoherencyHeader(unz64_s *s, uint32_t *psize_variab
*/
extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, int raw, const char *password)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
file_in_zip64_read_info_s *pfile_in_zip_read_info = NULL;
uint16_t compression_method = 0;
uint64_t offset_local_extrafield = 0;
@@ -1055,7 +1050,7 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
#endif
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (!s->current_file_ok)
return UNZ_PARAMERROR;
@@ -1064,25 +1059,7 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
if (unzCheckCurrentFileCoherencyHeader(s, &size_variable, &offset_local_extrafield, &size_local_extrafield) != UNZ_OK)
return UNZ_BADZIPFILE;
pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s));
if (pfile_in_zip_read_info == NULL)
return UNZ_INTERNALERROR;
pfile_in_zip_read_info->read_buffer = (uint8_t*)ALLOC(UNZ_BUFSIZE);
pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
pfile_in_zip_read_info->pos_local_extrafield = 0;
pfile_in_zip_read_info->raw = raw;
if (pfile_in_zip_read_info->read_buffer == NULL)
{
TRYFREE(pfile_in_zip_read_info);
return UNZ_INTERNALERROR;
}
pfile_in_zip_read_info->stream_initialised = 0;
compression_method = s->cur_file_info.compression_method;
#ifdef HAVE_AES
if (compression_method == AES_METHOD)
@@ -1090,7 +1067,6 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
compression_method = s->cur_file_info_internal.aes_compression_method;
if (password == NULL)
{
TRYFREE(pfile_in_zip_read_info);
return UNZ_PARAMERROR;
}
}
@@ -1116,24 +1092,52 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
if (compression_method != Z_BZIP2ED)
#endif
{
TRYFREE(pfile_in_zip_read_info);
return UNZ_BADZIPFILE;
}
}
pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s));
if (pfile_in_zip_read_info == NULL)
return UNZ_INTERNALERROR;
pfile_in_zip_read_info->read_buffer = (uint8_t*)ALLOC(UNZ_BUFSIZE);
if (pfile_in_zip_read_info->read_buffer == NULL)
{
TRYFREE(pfile_in_zip_read_info);
return UNZ_INTERNALERROR;
}
pfile_in_zip_read_info->stream_initialised = 0;
pfile_in_zip_read_info->crc32_wait = s->cur_file_info.crc;
pfile_in_zip_read_info->crc32 = 0;
pfile_in_zip_read_info->total_out_64 = 0;
pfile_in_zip_read_info->compression_method = compression_method;
pfile_in_zip_read_info->filestream = s->filestream;
pfile_in_zip_read_info->z_filefunc = s->z_filefunc;
pfile_in_zip_read_info->raw = raw;
pfile_in_zip_read_info->crc32 = 0;
pfile_in_zip_read_info->crc32_expected = s->cur_file_info.crc;
pfile_in_zip_read_info->total_out_64 = 0;
pfile_in_zip_read_info->compression_method = compression_method;
pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
pfile_in_zip_read_info->pos_local_extrafield = 0;
pfile_in_zip_read_info->rest_read_compressed = s->cur_file_info.compressed_size;
pfile_in_zip_read_info->rest_read_uncompressed = s->cur_file_info.uncompressed_size;
pfile_in_zip_read_info->byte_before_the_zipfile = 0;
if (s->number_disk == s->gi.number_disk_with_CD)
pfile_in_zip_read_info->byte_before_the_zipfile = s->byte_before_the_zipfile;
else
pfile_in_zip_read_info->byte_before_the_zipfile = 0;
pfile_in_zip_read_info->pos_in_zipfile = s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + size_variable;
pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
pfile_in_zip_read_info->stream.zfree = (free_func)0;
pfile_in_zip_read_info->stream.opaque = (voidpf)s;
pfile_in_zip_read_info->stream.total_out = 0;
pfile_in_zip_read_info->stream.total_in = 0;
pfile_in_zip_read_info->stream.next_in = NULL;
pfile_in_zip_read_info->stream.avail_in = 0;
if (!raw)
{
@@ -1145,12 +1149,6 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
pfile_in_zip_read_info->bstream.opaque = (voidpf)0;
pfile_in_zip_read_info->bstream.state = (voidpf)0;
pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
pfile_in_zip_read_info->stream.zfree = (free_func)0;
pfile_in_zip_read_info->stream.opaque = (voidpf)0;
pfile_in_zip_read_info->stream.next_in = (voidpf)0;
pfile_in_zip_read_info->stream.avail_in = 0;
err = BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0);
if (err == Z_OK)
{
@@ -1167,12 +1165,6 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
}
else if (compression_method == Z_DEFLATED)
{
pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
pfile_in_zip_read_info->stream.zfree = (free_func)0;
pfile_in_zip_read_info->stream.opaque = (voidpf)s;
pfile_in_zip_read_info->stream.next_in = 0;
pfile_in_zip_read_info->stream.avail_in = 0;
#ifdef HAVE_APPLE_COMPRESSION
err = compression_stream_init(&pfile_in_zip_read_info->astream, COMPRESSION_STREAM_DECODE, COMPRESSION_ZLIB);
if (err == COMPRESSION_STATUS_ERROR)
@@ -1201,11 +1193,6 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
}
}
pfile_in_zip_read_info->rest_read_compressed = s->cur_file_info.compressed_size;
pfile_in_zip_read_info->rest_read_uncompressed = s->cur_file_info.uncompressed_size;
pfile_in_zip_read_info->pos_in_zipfile = s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + size_variable;
pfile_in_zip_read_info->stream.avail_in = 0;
s->pfile_in_zip_read = pfile_in_zip_read_info;
#ifndef NOUNCRYPT
@@ -1293,13 +1280,13 @@ extern int ZEXPORT unzOpenCurrentFile2(unzFile file, int *method, int *level, in
return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */
extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, uint32_t len)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
uint32_t read = 0;
int err = UNZ_OK;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (s->pfile_in_zip_read == NULL)
return UNZ_PARAMERROR;
@@ -1572,13 +1559,13 @@ extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, uint32_t len)
extern int ZEXPORT unzGetLocalExtrafield(unzFile file, voidp buf, uint32_t len)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
uint64_t size_to_read = 0;
uint32_t read_now = 0;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (s->pfile_in_zip_read == NULL)
return UNZ_PARAMERROR;
@@ -1608,13 +1595,13 @@ extern int ZEXPORT unzGetLocalExtrafield(unzFile file, voidp buf, uint32_t len)
extern int ZEXPORT unzCloseCurrentFile(unzFile file)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
file_in_zip64_read_info_s *pfile_in_zip_read_info = NULL;
int err = UNZ_OK;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
pfile_in_zip_read_info = s->pfile_in_zip_read;
if (pfile_in_zip_read_info == NULL)
return UNZ_PARAMERROR;
@@ -1641,7 +1628,7 @@ extern int ZEXPORT unzCloseCurrentFile(unzFile file)
if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
(!pfile_in_zip_read_info->raw))
{
if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_expected)
err = UNZ_CRCERROR;
}
}
@@ -1674,12 +1661,12 @@ extern int ZEXPORT unzCloseCurrentFile(unzFile file)
extern int ZEXPORT unzGoToFirstFile2(unzFile file, unz_file_info64 *pfile_info, char *filename,
uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, uint16_t comment_size)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
int err = UNZ_OK;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
s->pos_in_central_dir = s->offset_central_dir;
s->num_file = 0;
@@ -1702,12 +1689,12 @@ extern int ZEXPORT unzGoToFirstFile(unzFile file)
extern int ZEXPORT unzGoToNextFile2(unzFile file, unz_file_info64 *pfile_info, char *filename,
uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, uint16_t comment_size)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
int err = UNZ_OK;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (!s->current_file_ok)
return UNZ_END_OF_LIST_OF_FILE;
@@ -1738,7 +1725,7 @@ extern int ZEXPORT unzGoToNextFile(unzFile file)
extern int ZEXPORT unzLocateFile(unzFile file, const char *filename, unzFileNameComparer filename_compare_func)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
unz_file_info64 cur_file_info_saved;
unz_file_info64_internal cur_file_info_internal_saved;
uint64_t num_file_saved = 0;
@@ -1750,7 +1737,7 @@ extern int ZEXPORT unzLocateFile(unzFile file, const char *filename, unzFileName
return UNZ_PARAMERROR;
if (strlen(filename) >= UNZ_MAXFILENAMEINZIP)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (!s->current_file_ok)
return UNZ_END_OF_LIST_OF_FILE;
@@ -1805,11 +1792,11 @@ extern int ZEXPORT unzGoToFilePos(unzFile file, unz_file_pos *file_pos)
extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos *file_pos)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
if (file == NULL || file_pos == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (!s->current_file_ok)
return UNZ_END_OF_LIST_OF_FILE;
@@ -1820,12 +1807,12 @@ extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos *file_pos)
extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos *file_pos)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
int err = UNZ_OK;
if (file == NULL || file_pos == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
/* Jump to the right spot */
s->pos_in_central_dir = file_pos->pos_in_zip_directory;
@@ -1850,11 +1837,11 @@ extern int32_t ZEXPORT unzGetOffset(unzFile file)
extern int64_t ZEXPORT unzGetOffset64(unzFile file)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (!s->current_file_ok)
return 0;
if (s->gi.number_entry != 0 && s->gi.number_entry != UINT16_MAX)
@@ -1872,12 +1859,12 @@ extern int ZEXPORT unzSetOffset(unzFile file, uint32_t pos)
extern int ZEXPORT unzSetOffset64(unzFile file, uint64_t pos)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
int err = UNZ_OK;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
s->pos_in_central_dir = pos;
s->num_file = s->gi.number_entry; /* hack */
@@ -1889,10 +1876,10 @@ extern int ZEXPORT unzSetOffset64(unzFile file, uint64_t pos)
extern int32_t ZEXPORT unzTell(unzFile file)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (s->pfile_in_zip_read == NULL)
return UNZ_PARAMERROR;
return (int32_t)s->pfile_in_zip_read->stream.total_out;
@@ -1900,10 +1887,10 @@ extern int32_t ZEXPORT unzTell(unzFile file)
extern int64_t ZEXPORT unzTell64(unzFile file)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (s->pfile_in_zip_read == NULL)
return UNZ_PARAMERROR;
return s->pfile_in_zip_read->total_out_64;
@@ -1916,7 +1903,7 @@ extern int ZEXPORT unzSeek(unzFile file, uint32_t offset, int origin)
extern int ZEXPORT unzSeek64(unzFile file, uint64_t offset, int origin)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
uint64_t stream_pos_begin = 0;
uint64_t stream_pos_end = 0;
uint64_t position = 0;
@@ -1924,7 +1911,7 @@ extern int ZEXPORT unzSeek64(unzFile file, uint64_t offset, int origin)
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (s->pfile_in_zip_read == NULL)
return UNZ_ERRNO;
@@ -1979,10 +1966,10 @@ extern int ZEXPORT unzSeek64(unzFile file, uint64_t offset, int origin)
extern int ZEXPORT unzEndOfFile(unzFile file)
{
unz64_s *s = NULL;
unz64_internal *s = NULL;
if (file == NULL)
return UNZ_PARAMERROR;
s = (unz64_s*)file;
s = (unz64_internal*)file;
if (s->pfile_in_zip_read == NULL)
return UNZ_PARAMERROR;
if (s->pfile_in_zip_read->rest_read_uncompressed == 0)

View File

@@ -1,14 +1,16 @@
/* unzip.h -- IO for uncompress .zip files using zlib
Version 1.1, February 14h, 2010
Version 1.2.0, September 16th, 2017
part of the MiniZip project
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
Copyright (C) 2009-2010 Mathias Svensson
Modifications for Zip64 support on both zip and unzip
http://result42.com
Copyright (C) 2007-2008 Even Rouault
Modifications of Unzip for Zip64
Copyright (C) 1998-2010 Gilles Vollant
http://www.winimage.com/zLibDll/minizip.html
Modifications of Unzip for Zip64
Copyright (C) 2007-2008 Even Rouault
Modifications for Zip64 support on both zip and unzip
Copyright (C) 2009-2010 Mathias Svensson
http://result42.com
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.

View File

@@ -1,14 +1,15 @@
/* zip.c -- IO on .zip files using zlib
Version 1.1, February 14h, 2010
Version 1.2.0, September 16th, 2017
part of the MiniZip project
Copyright (C) 2010-2017 Nathan Moinvaziri
Modifications for AES, PKWARE disk spanning
https://github.com/nmoinvaz/minizip
Copyright (C) 2009-2010 Mathias Svensson
Modifications for Zip64 support
http://result42.com
Copyright (C) 1998-2010 Gilles Vollant
http://www.winimage.com/zLibDll/minizip.html
Modifications for Zip64 support
Copyright (C) 2009-2010 Mathias Svensson
http://result42.com
Modifications for AES, PKWARE disk spanning
Copyright (C) 2010-2014 Nathan Moinvaziri
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.
@@ -912,7 +913,7 @@ extern zipFile ZEXPORT zipOpen64(const void *path, int append)
extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char *filename, const zip_fileinfo *zipfi,
const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global,
uint16_t size_extrafield_global, const char *comment, uint16_t method, int level, int raw, int windowBits, int memLevel,
int strategy, const char *password, uint32_t crc_for_crypting, uint16_t version_madeby, uint16_t flag_base, int zip64)
int strategy, const char *password, ZIP_UNUSED uint32_t crc_for_crypting, uint16_t version_madeby, uint16_t flag_base, int zip64)
{
zip64_internal *zi = NULL;
uint64_t size_available = 0;
@@ -924,7 +925,6 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char *filename, c
int err = ZIP_OK;
#ifdef NOCRYPT
(crc_for_crypting);
if (password != NULL)
return ZIP_PARAMERROR;
#endif
@@ -1237,10 +1237,7 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char *filename, c
/*
Info-ZIP modification to ZipCrypto format:
If bit 3 of the general purpose bit flag is set, it uses high byte of 16-bit File Time.
verify1 = (uint8_t)((crc_for_crypting >> 16) & 0xff);
verify2 = (uint8_t)((crc_for_crypting >> 24) & 0xff); */
*/
verify1 = (uint8_t)((zi->ci.dos_date >> 16) & 0xff);
verify2 = (uint8_t)((zi->ci.dos_date >> 8) & 0xff);
@@ -1261,7 +1258,7 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char *filename, c
extern int ZEXPORT zipOpenNewFileInZip4(zipFile file, const char *filename, const zip_fileinfo *zipfi,
const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global,
uint16_t size_extrafield_global, const char *comment, uint16_t method, int level, int raw, int windowBits,
int memLevel, int strategy, const char *password, uint32_t crc_for_crypting, uint16_t version_madeby, uint16_t flag_base)
int memLevel, int strategy, const char *password, ZIP_UNUSED uint32_t crc_for_crypting, uint16_t version_madeby, uint16_t flag_base)
{
return zipOpenNewFileInZip4_64(file, filename, zipfi, extrafield_local, size_extrafield_local,
extrafield_global, size_extrafield_global, comment, method, level, raw, windowBits, memLevel,
@@ -1271,7 +1268,7 @@ extern int ZEXPORT zipOpenNewFileInZip4(zipFile file, const char *filename, cons
extern int ZEXPORT zipOpenNewFileInZip3(zipFile file, const char *filename, const zip_fileinfo *zipfi,
const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global,
uint16_t size_extrafield_global, const char *comment, uint16_t method, int level, int raw, int windowBits,
int memLevel, int strategy, const char *password, uint32_t crc_for_crypting)
int memLevel, int strategy, const char *password, ZIP_UNUSED uint32_t crc_for_crypting)
{
return zipOpenNewFileInZip4_64(file, filename, zipfi, extrafield_local, size_extrafield_local,
extrafield_global, size_extrafield_global, comment, method, level, raw, windowBits, memLevel,
@@ -1281,7 +1278,7 @@ extern int ZEXPORT zipOpenNewFileInZip3(zipFile file, const char *filename, cons
extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char *filename, const zip_fileinfo *zipfi,
const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global,
uint16_t size_extrafield_global, const char *comment, uint16_t method, int level, int raw, int windowBits,
int memLevel, int strategy, const char *password, uint32_t crc_for_crypting, int zip64)
int memLevel, int strategy, const char *password, ZIP_UNUSED uint32_t crc_for_crypting, int zip64)
{
return zipOpenNewFileInZip4_64(file, filename, zipfi, extrafield_local, size_extrafield_local,
extrafield_global, size_extrafield_global, comment, method, level, raw, windowBits, memLevel, strategy,

View File

@@ -1,12 +1,14 @@
/* zip.h -- IO on .zip files using zlib
Version 1.1, February 14h, 2010
Version 1.2.0, September 16th, 2017
part of the MiniZip project
Copyright (C) 2012-2017 Nathan Moinvaziri
https://github.com/nmoinvaz/minizip
Copyright (C) 2009-2010 Mathias Svensson
Modifications for Zip64 support
http://result42.com
Copyright (C) 1998-2010 Gilles Vollant
http://www.winimage.com/zLibDll/minizip.html
Modifications for Zip64 support
Copyright (C) 2009-2010 Mathias Svensson
http://result42.com
This program is distributed under the terms of the same license as zlib.
See the accompanying LICENSE file for the full text of the license.
@@ -51,6 +53,12 @@ typedef voidp zipFile;
#define ZIP_BADZIPFILE (-103)
#define ZIP_INTERNALERROR (-104)
#ifdef __GNUC__
# define ZIP_UNUSED __attribute__((__unused__))
#else
# define ZIP_UNUSED
#endif
#ifndef DEF_MEM_LEVEL
# if MAX_MEM_LEVEL >= 8
# define DEF_MEM_LEVEL 8
@@ -140,28 +148,28 @@ extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char *filename, c
extern int ZEXPORT zipOpenNewFileInZip3(zipFile file, const char *filename, const zip_fileinfo *zipfi,
const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global,
uint16_t size_extrafield_global, const char *comment, uint16_t method, int level, int raw, int windowBits, int memLevel,
int strategy, const char *password, uint32_t crcForCrypting);
int strategy, const char *password, ZIP_UNUSED uint32_t crc_for_crypting);
/* Same as zipOpenNewFileInZip2, except
windowBits, memLevel, strategy : see parameter strategy in deflateInit2
password : crypting password (NULL for no crypting)
crcForCrypting : crc of file to compress (needed for crypting) */
crc_for_crypting : crc of file to compress (needed for crypting) */
extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char *filename, const zip_fileinfo *zipfi,
const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global,
uint16_t size_extrafield_global, const char *comment, uint16_t method, int level, int raw, int windowBits, int memLevel,
int strategy, const char *password, uint32_t crc_for_crypting, int zip64);
int strategy, const char *password, ZIP_UNUSED uint32_t crc_for_crypting, int zip64);
/* Same as zipOpenNewFileInZip3 with zip64 support */
extern int ZEXPORT zipOpenNewFileInZip4(zipFile file, const char *filename, const zip_fileinfo *zipfi,
const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global,
uint16_t size_extrafield_global, const char *comment, uint16_t method, int level, int raw, int windowBits, int memLevel,
int strategy, const char *password, uint32_t crc_for_crypting, uint16_t version_madeby, uint16_t flag_base);
int strategy, const char *password, ZIP_UNUSED uint32_t crc_for_crypting, uint16_t version_madeby, uint16_t flag_base);
/* Same as zipOpenNewFileInZip3 except versionMadeBy & flag fields */
extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char *filename, const zip_fileinfo *zipfi,
const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global,
uint16_t size_extrafield_global, const char *comment, uint16_t method, int level, int raw, int windowBits, int memLevel,
int strategy, const char *password, uint32_t crc_for_crypting, uint16_t version_madeby, uint16_t flag_base, int zip64);
int strategy, const char *password, ZIP_UNUSED uint32_t crc_for_crypting, uint16_t version_madeby, uint16_t flag_base, int zip64);
/* Same as zipOpenNewFileInZip4 with zip64 support */
extern int ZEXPORT zipWriteInFileInZip(zipFile file, const void *buf, uint32_t len);

View File

@@ -1,5 +1,5 @@
PODS:
- SSZipArchive (2.0.6)
- SSZipArchive (2.0.8)
DEPENDENCIES:
- SSZipArchive (from `..`)
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: ..
SPEC CHECKSUMS:
SSZipArchive: be986987cc955e02b89094337573689735cd1913
SSZipArchive: e6ab66e1936fac7e3b5073e9f5eb364d91dfbfc7
PODFILE CHECKSUM: 0dc500eb72745751ccba7677de4da5534fcef36d

View File

@@ -462,6 +462,8 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_ACTIVITY_MODE = "";
"DEBUG_ACTIVITY_MODE[sdk=iphonesimulator*]" = default;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -479,7 +481,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -515,6 +517,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_ACTIVITY_MODE = "";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -526,7 +529,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";

View File

@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DFE19081BDA74F800709011"
BuildableName = "SwiftExample.app"
BlueprintName = "SwiftExample"
ReferencedContainer = "container:SwiftExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DFE191C1BDA74F800709011"
BuildableName = "SwiftExampleTests.xctest"
BlueprintName = "SwiftExampleTests"
ReferencedContainer = "container:SwiftExample.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DFE19081BDA74F800709011"
BuildableName = "SwiftExample.app"
BlueprintName = "SwiftExample"
ReferencedContainer = "container:SwiftExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DFE19081BDA74F800709011"
BuildableName = "SwiftExample.app"
BlueprintName = "SwiftExample"
ReferencedContainer = "container:SwiftExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "${DEBUG_ACTIVITY_MODE}"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DFE19081BDA74F800709011"
BuildableName = "SwiftExample.app"
BlueprintName = "SwiftExample"
ReferencedContainer = "container:SwiftExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2B4B24641C21500E00CC99E5"
BuildableName = "SwiftExampleCarthage.app"
BlueprintName = "SwiftExampleCarthage"
ReferencedContainer = "container:SwiftExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2B4B24641C21500E00CC99E5"
BuildableName = "SwiftExampleCarthage.app"
BlueprintName = "SwiftExampleCarthage"
ReferencedContainer = "container:SwiftExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2B4B24641C21500E00CC99E5"
BuildableName = "SwiftExampleCarthage.app"
BlueprintName = "SwiftExampleCarthage"
ReferencedContainer = "container:SwiftExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2B4B24641C21500E00CC99E5"
BuildableName = "SwiftExampleCarthage.app"
BlueprintName = "SwiftExampleCarthage"
ReferencedContainer = "container:SwiftExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
@@ -30,6 +40,16 @@
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
@@ -59,6 +79,11 @@
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB