64 Commits
v1.5 ... v1.7

Author SHA1 Message Date
Joshua Hudson
e3fdfed61a Fix broken test in SSZipArchiveTests.m 2017-01-23 22:38:17 -08:00
Joshua Hudson
83e12647c7 Travis YML file updated works with Travis and Xcode 8.2 2017-01-23 22:31:30 -08:00
Joshua Hudson
bca3071c70 Tweak broken test to make sure caught by travis 2017-01-23 22:30:57 -08:00
Joshua Hudson
841fd2ea2e break test to make sure travis is now building and catching errors 2017-01-23 22:23:15 -08:00
Joshua Hudson
005717dcd9 Update Travis YML 2017-01-23 22:16:07 -08:00
Joshua Hudson
aaaf20c60b Update Travis YML 2017-01-23 22:12:10 -08:00
Joshua Hudson
965e97dab4 trying to match correct destination in Travis YML 2017-01-23 22:07:05 -08:00
Joshua Hudson
2df54985de remove destination spaces (travis YML 2017-01-23 22:00:54 -08:00
Joshua Hudson
244d20f17f Update travis yml 2017-01-23 21:57:26 -08:00
Joshua Hudson
06da04803a Travis YML update 2017-01-23 21:43:47 -08:00
Joshua Hudson
1a9738db0e Travis YML - Remove leading dash 2017-01-23 21:38:13 -08:00
Joshua Hudson
8e7cc4eeaa Travis YML updates 2017-01-23 21:34:48 -08:00
Joshua Hudson
5869cd2f6f Update Travis YML 2017-01-23 21:29:02 -08:00
Joshua Hudson
85e38f376e Update Travis YML 2017-01-23 21:28:09 -08:00
Joshua Hudson
a7a9c28973 Travis YML updated 2017-01-23 21:25:25 -08:00
Joshua Hudson
e4697c5a66 Update Travis YML 2017-01-23 21:16:05 -08:00
Joshua Hudson
eeded9e86d More travis.yml config changes 2017-01-23 21:00:44 -08:00
Joshua Hudson
421c1b4ccc More travis.yml updates
Try Try Again... ;(
2017-01-23 20:48:27 -08:00
Joshua Hudson
f0a9965fa7 Update travis_yml just to get it to build 2017-01-23 20:31:46 -08:00
Joshua Hudson
34101c011b Update .travis.yml 2017-01-23 17:09:40 -08:00
Joshua Hudson
37f21d93d0 fix travis file bug 2017-01-23 17:09:01 -08:00
Joshua Hudson
b99e680aaf first step get travis to simply build project. Tests next. 2017-01-23 17:08:19 -08:00
Joshua Hudson
96b49ffae5 Remove clean as it is no longer supported in xCode 8 2017-01-23 17:01:04 -08:00
Joshua Hudson
f87799f92c Hide file labels in Swift example until unzipped. Remove file names to just be random test files vs "News Headlines" that were added by a contributor. Another shot at fixing warning messages. 2017-01-23 16:06:47 -08:00
Joshua Hudson
2ca4264756 Merge pull request #309 from Davidde94/master
Added ability to get progress of zip file creation.
2017-01-23 15:59:39 -08:00
Joshua Hudson
2e975c2895 rollback travis xml changes 2017-01-23 15:26:18 -08:00
David Evans
84a96fc298 Added ability to retrieve zip creation progress.
Fixed a issue that was caused in the previous PR regarding this feature.
2017-01-23 19:45:35 +00:00
Joshua Hudson
57ea2842ac fix warning message 2017-01-23 11:27:32 -08:00
Joshua Hudson
c8eee45526 Project file tweaks 2017-01-23 11:25:59 -08:00
Joshua Hudson
02248d8d04 Merge pull request #305 from nerdishbynature/swift30
Swift 3.0.2 (Xcode 8.2)
2017-01-23 11:11:45 -08:00
David Evans
a363be72d7 Merge remote-tracking branch 'ZipArchive/master' 2017-01-23 19:09:20 +00:00
Joshua Hudson
5d903ee581 Compile with latest xcode and bump podspec 2017-01-23 11:08:36 -08:00
Joshua Hudson
254172f351 Merge pull request #308 from ZipArchive/revert-307-master
Revert "Added support for getting zip file creation progress."
2017-01-23 11:05:45 -08:00
Joshua Hudson
d7751a54f5 Revert "Added support for getting zip file creation progress." 2017-01-23 11:05:24 -08:00
Joshua Hudson
58cd06b7d8 Merge pull request #307 from Davidde94/master
Added support for getting zip file creation progress.
2017-01-23 11:00:41 -08:00
Joshua Hudson
4fcec5bf76 Merge pull request #299 from polac24/master
Define NSError as nullable argument of completionHandler
2017-01-23 10:57:06 -08:00
Joshua Hudson
4a2bc37c7a Add test for #296. Check for both valid and invalid password checks. 2017-01-23 10:53:39 -08:00
Joshua Hudson
7bac3fb757 Merge pull request #296 from fritzt0/master
Added password validation & prevent stale file entries in case of invalid password
2017-01-23 09:47:27 -08:00
David Evans
97cd6424fd Added changes left out in last commit.
Users can now provide a callback to retrieve real-time statistics on
the progress of zipping files.
2017-01-21 18:29:28 +00:00
David Evans
0c98af7f9e Added support for retrieving zip progress information.
No additional information required.
2017-01-21 01:05:45 +00:00
Piet Brauer
3952b05eb3 Adapt new xctool usage 2017-01-19 16:14:01 +01:00
Piet Brauer
54e447185d Use Xcode 8.2 2017-01-19 11:11:10 +01:00
Piet Brauer
73fb2132a8 Migrate Swift example to Swift 3 2017-01-18 13:12:54 +01:00
Piet Brauer
39ebc12bc8 “Migrate” to Swift 3 2017-01-18 13:11:18 +01:00
Bartosz Polaczyk
a13812407b Define NSError as nullable argument of completionHandler
In order to expose it as Error? in Swift3 rather than Error
2016-11-09 10:55:14 +01:00
Felix Ritter
df48275b02 Added bad password detection for AES from minizip master 2016-11-05 15:19:45 +01:00
Felix Ritter
46ebe69295 Ensure we are not creating stale file entries in unzipFileAtPath 2016-11-05 15:16:16 +01:00
Felix Ritter
c08241ef19 added isPasswordValidForArchiveAtPath method 2016-11-05 15:14:30 +01:00
Joshua Hudson
76ca4b3293 pod version bump 2016-09-28 09:17:16 -07:00
Joshua Hudson
2ad2d02a81 Merge pull request #290 from ZipArchive/revert-281-dev-fileoption
Revert "Extended to allow passing in directory or file to unzip to"
2016-09-27 20:39:50 -07:00
Joshua Hudson
ab77a21ffc Revert "Extended to allow passing in directory or file to unzip to" 2016-09-27 20:38:52 -07:00
Joshua Hudson
96577a06c8 Update Readme
Clarify Swift3 vs Swift 2.3 support
2016-09-21 08:53:11 -07:00
Joshua Hudson
39b3500120 Bump Podspec 2016-09-14 12:11:37 -07:00
Joshua Hudson
f4c0147086 Merge pull request #285 from priya87/master
Bug fix: feof() creates infinite loop.
2016-09-14 10:34:28 -07:00
Joshua Hudson
9dae2eca4a Update README.md 2016-09-14 10:33:38 -07:00
priya TIROUNARAYANANE
650c6fb0ab Bug fix: feof() creates infinite loop. 2016-09-14 10:05:00 +02:00
Joshua Hudson
edc099d6be Update swift test project for swift 3 and xcode 8 2016-09-13 11:02:55 -07:00
Joshua Hudson
81c8672414 Update Readme.md 2016-09-13 10:45:08 -07:00
Joshua Hudson
df34c1b896 Merge pull request #281 from simerjots/dev-fileoption
Extended to allow passing in directory or file to unzip to
2016-09-13 10:43:41 -07:00
Joshua Hudson
79fd869347 Merge pull request #282 from pk/master
Convert Swift code in to Swift 3 and change appropriate project settings
2016-09-13 10:43:03 -07:00
Joshua Hudson
38c24c156a Merge pull request #284 from priya87/master
Added SSZipCommom.h to target ZipArchive-Mac
2016-09-13 10:41:41 -07:00
priya TIROUNARAYANANE
e764d19b9e Added SSZipCommom.h to target ZipArchive-Mac 2016-09-13 12:30:35 +02:00
Pavel Kunc
3c06f00fee Convert Swift code in to Swift 3 and change appropriate project
settings.
2016-09-13 09:17:31 +01:00
Sam Singh
d1e5f47e29 Extended to allow passing in directory or file to unzip to 2016-09-05 20:40:00 -04:00
34 changed files with 319 additions and 219 deletions

View File

@@ -1,7 +1,7 @@
language: objective-c
osx_image: xcode7.2
osx_image: xcode8.2
podfile: ObjectiveCExample/Podfile
xcode_workspace: ObjectiveCExample/ObjectiveCExample.xcworkspace
xcode_scheme: ObjectiveCExample
script:
- xctool -workspace ObjectiveCExample/ObjectiveCExample.xcworkspace -scheme ObjectiveCExample -sdk iphonesimulator clean test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
script: xcodebuild -workspace ObjectiveCExample/ObjectiveCExample.xcworkspace -scheme ObjectiveCExample -sdk iphonesimulator -destination "id=E40727B3-41FB-4D6E-B4CB-BFA87109EB12" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test

View File

@@ -265,7 +265,7 @@
8DFE19E21BDA9FF300709011 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0820;
TargetAttributes = {
8DFE19E91BDA9FF300709011 = {
CreatedOnToolsVersion = 7.1;
@@ -488,8 +488,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -532,8 +534,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -0,0 +1,9 @@
# 1
** This is a test **
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non ex turpis. Quisque quis porttitor nunc, sed sollicitudin urna. Aliquam ullamcorper ante fringilla ipsum feugiat egestas. Praesent a dapibus nisi. Proin dignissim non elit sit amet vestibulum. Proin et velit sit amet eros pretium maximus. Suspendisse potenti. Integer dolor felis, vehicula a ipsum vel, faucibus sodales nunc. Nam luctus nunc at malesuada pretium. Suspendisse nec leo in massa ultricies euismod at sed tortor. Nullam eleifend massa eget ultrices sollicitudin. Praesent id dolor vestibulum, mattis nisi ac, semper mi. Aenean justo dui, sollicitudin ut cursus eu, bibendum quis purus. Duis nec nisl augue.
In et leo in lacus ultricies congue. Sed quis erat ex. Proin tristique leo tincidunt justo hendrerit luctus. Nam mattis fringilla sapien a tincidunt. Nulla ultricies ut ex ac imperdiet. Proin tristique sit amet est nec facilisis. Donec rutrum mauris a pellentesque mollis. Cras blandit arcu at sem vulputate commodo. Mauris ipsum massa, hendrerit vitae cursus sed, malesuada at augue. Aenean nec nisi purus. In lacus mi, luctus id mattis vitae, lacinia sit amet mi. Mauris mollis convallis velit vel vestibulum. Praesent scelerisque eros tellus, sit amet varius massa eleifend et. Duis quis vehicula nisi, vel ultrices mi. Duis eu ipsum ac lorem dignissim semper vel sed nulla.
Aenean tempus placerat aliquam. Nam accumsan sapien eu ex pretium ullamcorper. Fusce ac risus tortor. Praesent gravida ultricies magna eu aliquam. Nam facilisis lobortis ante vitae imperdiet. Pellentesque metus quam, fermentum sed posuere sed, iaculis in tellus. Donec consequat dui vel nibh mollis porta. Proin sit amet consectetur nisl. Integer tellus justo, imperdiet commodo est at, condimentum viverra est. Maecenas nec erat pharetra, laoreet odio non, rhoncus felis. Curabitur id ex aliquam, mattis massa quis, facilisis ex.

View File

@@ -0,0 +1,7 @@
# Test # 2
** This is a second test file **
Morbi vel metus quis lorem tincidunt tempus sit amet quis magna. Nullam dolor dolor, eleifend in vestibulum nec, auctor at ipsum. Nullam viverra neque eros, a vehicula lacus tempus vitae. In sapien sapien, gravida mollis lectus sed, luctus egestas massa. Donec mollis tortor sit amet erat gravida ornare at sed felis. In ornare posuere velit, quis ultrices velit porta eget. Proin eu ultrices felis, eu finibus dolor. Quisque ultrices id libero at euismod. Sed mollis lacus id leo dignissim condimentum eget ac nunc. Vestibulum sed congue velit. Curabitur semper non lorem vel cursus. Ut sed augue purus. Sed sit amet faucibus ante, vel blandit justo. Duis id lacinia ex. Nullam pulvinar eget lacus in tristique. Nam et odio consequat, vehicula mauris ut, vulputate mi.
Pellentesque feugiat, nulla in dictum lacinia, risus sapien aliquam magna, vitae efficitur neque mauris sagittis neque. Etiam eu hendrerit erat. Vestibulum aliquet sapien sed fermentum ultricies. Maecenas eu risus nec turpis semper consequat. Cras nisl diam, consequat ut orci nec, rutrum cursus est. Quisque dictum nunc leo, lobortis lacinia nisl ultrices eget. Ut imperdiet eu libero quis blandit. Nunc blandit, leo quis rutrum auctor, ex tortor vehicula sem, eu ultrices ipsum mi vel arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;

View File

@@ -1,9 +0,0 @@
# China to ban ivory trade
**HONG KONG** — It could be the beginning of the end for the illicit trade in ivory.
Last month, on a state visit to Washington, Chinese President Xi Jinping promised to stop the commercial trade in ivory in his country but gave few details about the timing and extent of such a move.
Now, a senior U.S. government official says that the Chinese ban could be in place within a year or so, with very narrow exceptions, describing it as a “huge” deal.
Such a move, conservationists say, would be a major step toward ending the poaching crisis that is decimating Africas elephant herds.

View File

@@ -1,9 +0,0 @@
# Kerry in Syria
**VIENNA** — The war raging in Syria took center stage for Secretary of State John F. Kerry on Friday as he kicked off a series of meetings with diplomats seeking common ground on a strategy to resolve the grinding conflict.
But the foreign ministers of the three countries meeting with Kerry — Russia, Saudi Arabia and NATO-member Turkey — carry sharply competing views on how to proceed.
Saudi Arabia and Turkey, the neighboring country that has been overwhelmed with Syrian refugees, agree with Washington that Syrian President Bashar Al-Assad should eventually leave power.
Moscow is one of Assads biggest backers, and in recent weeks has positioned its military in Syria and conducted heavy airstrikes that have allowed Assads forces to resume ground offensives. The Russian military intervention also has alarmed the Pentagon, which is leading a separate air campaign against the Islamic State.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -23,7 +23,7 @@
@implementation CancelDelegate
- (void)zipArchiveDidUnzipFileAtIndex:(NSInteger)fileIndex totalFiles:(NSInteger)totalFiles archivePath:(NSString *)archivePath fileInfo:(unz_file_info)fileInfo
{
_numFilesUnzipped = fileIndex + 1;
_numFilesUnzipped = (int)fileIndex + 1;
}
- (BOOL)zipArchiveShouldUnzipFileAtIndex:(NSInteger)fileIndex totalFiles:(NSInteger)totalFiles archivePath:(NSString *)archivePath fileInfo:(unz_file_info)fileInfo
{
@@ -173,7 +173,22 @@
XCTAssertTrue([fileManager fileExistsAtPath:testPath], @"LICENSE unzipped");
}
- (void)testPasswordCheck {
- (void)testValidatePassword {
NSString *zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"TestPasswordArchive" ofType:@"zip"];
NSError *error = nil;
BOOL fileHasValidPassword = [SSZipArchive isPasswordValidForArchiveAtPath:zipPath password:@"passw0rd" error:&error];
XCTAssertTrue(fileHasValidPassword,@"Valid password reports false.");
BOOL fileHasInvalidValidPassword = [SSZipArchive isPasswordValidForArchiveAtPath:zipPath password:@"passw0rd123" error:&error];
XCTAssertFalse(fileHasInvalidValidPassword,@"Invalid password reports true.");
}
- (void)testFilePasswordCheck {
NSString *zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"TestArchive" ofType:@"zip"];
BOOL protected = [SSZipArchive isFilePasswordProtectedAtPath:zipPath];

View File

@@ -1,5 +1,5 @@
PODS:
- SSZipArchive (1.5)
- SSZipArchive (1.7)
DEPENDENCIES:
- SSZipArchive (from `..`)
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: ".."
SPEC CHECKSUMS:
SSZipArchive: 29daace2bccb90a47de2837744da397728ff9207
SSZipArchive: 63f8e11cfcc33e03e4cd666b4359ea8bd6facd0c
PODFILE CHECKSUM: ae5fb993e5dc339b15e10067d1e60549fa585f32
COCOAPODS: 1.1.0.beta.1
COCOAPODS: 1.1.1

View File

@@ -14,6 +14,8 @@ ZipArchive is a simple utility class for zipping and unzipping files on iOS and
## Installation and Setup
*The main release branch is configured to support Objective C and Swift 3. There is a 'swift23' branch which is the latest branch but marked to compile for Swift 2.3.*
### CocoaPods
`pod install SSZipArchive`

View File

@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'SSZipArchive'
s.version = '1.5'
s.version = '1.7'
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'

View File

@@ -10,12 +10,12 @@ import Foundation
extension SSZipArchive {
static func unzipFileAtPath(path: String, toDestination destination: String, overwrite: Bool, password: String?, delegate: SSZipArchiveDelegate?) throws -> Bool {
static func unzipFileAtPath(_ path: String, toDestination destination: String, overwrite: Bool, password: String?, delegate: SSZipArchiveDelegate?) throws -> Bool {
var success = false
var error: NSError?
success = __unzipFileAtPath(path, toDestination: destination, overwrite: overwrite, password: password, error: &error, delegate: delegate)
success = __unzipFile(atPath: path, toDestination: destination, overwrite: overwrite, password: password, error: &error, delegate: delegate)
if let throwableError = error {
throw throwableError
}

View File

@@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
// Password check
+ (BOOL)isFilePasswordProtectedAtPath:(NSString *)path;
+ (BOOL)isPasswordValidForArchiveAtPath:(NSString *)path password:(NSString *)pw error:(NSError * __nullable * __nullable)error NS_SWIFT_NOTHROW;
// Unzip
+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination;
@@ -39,14 +40,14 @@ NS_ASSUME_NONNULL_BEGIN
+ (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 *error))completionHandler;
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 *error))completionHandler;
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler;
// Zip
@@ -60,6 +61,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)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;
- (instancetype)initWithPath:(NSString *)path;
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL open;

View File

@@ -59,6 +59,75 @@
return NO;
}
+ (BOOL)isPasswordValidForArchiveAtPath:(NSString *)path password:(NSString *)pw error:(NSError **)error {
if (error) {
*error = nil;
}
zipFile zip = unzOpen((const char*)[path UTF8String]);
if (zip == NULL) {
if (error) {
*error = [NSError errorWithDomain:@"SSZipArchiveErrorDomain"
code:-1
userInfo:@{NSLocalizedDescriptionKey: @"failed to open zip file"}];
}
return NO;
}
int ret = unzGoToFirstFile(zip);
if (ret == UNZ_OK) {
do {
if ([pw length] == 0) {
ret = unzOpenCurrentFile(zip);
} else {
ret = unzOpenCurrentFilePassword(zip, [pw cStringUsingEncoding:NSASCIIStringEncoding]);
}
if (ret != UNZ_OK) {
if (ret != UNZ_BADPASSWORD) {
if (error) {
*error = [NSError errorWithDomain:@"SSZipArchiveErrorDomain"
code:-2
userInfo:@{NSLocalizedDescriptionKey: @"failed to open first file in zip file"}];
}
}
return NO;
}
unz_file_info fileInfo = {0};
ret = unzGetCurrentFileInfo(zip, &fileInfo, NULL, 0, NULL, 0, NULL, 0);
if (ret != UNZ_OK) {
if (error) {
*error = [NSError errorWithDomain:@"SSZipArchiveErrorDomain"
code:-3
userInfo:@{NSLocalizedDescriptionKey: @"failed to retrieve info for file"}];
}
return NO;
} else if((fileInfo.flag & 1) == 1) {
unsigned char buffer[10] = {0};
int readBytes = unzReadCurrentFile(zip, buffer, (unsigned)MIN(10UL,fileInfo.uncompressed_size));
if (readBytes < 0) {
// Let's assume the invalid password caused this error
if (readBytes != Z_DATA_ERROR) {
if (error) {
*error = [NSError errorWithDomain:@"SSZipArchiveErrorDomain"
code:-4
userInfo:@{NSLocalizedDescriptionKey: @"failed to read contents of file entry"}];
}
}
return NO;
}
return YES;
}
unzCloseCurrentFile(zip);
ret = unzGoToNextFile(zip);
} while (ret==UNZ_OK && UNZ_OK!=UNZ_END_OF_LIST_OF_FILE);
}
// No password required
return YES;
}
#pragma mark - Unzipping
+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination
@@ -86,7 +155,7 @@
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 *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];
}
@@ -94,7 +163,7 @@
+ (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 *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];
}
@@ -118,7 +187,7 @@
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 *error))completionHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler
{
// Begin opening
zipFile zip = unzOpen((const char*)[path UTF8String]);
@@ -304,77 +373,80 @@
}
if (!fileIsSymbolicLink) {
FILE *fp = fopen((const char*)[fullPath UTF8String], "wb");
while (fp) {
int readBytes = unzReadCurrentFile(zip, buffer, 4096);
if (readBytes > 0) {
fwrite(buffer, readBytes, 1, fp );
} else {
break;
}
}
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 ]) {
[[NSFileManager defaultManager] removeItemAtPath:fullPath error:nil];
// ensure we are not creating stale file entries
int readBytes = unzReadCurrentFile(zip, buffer, 4096);
if (readBytes >= 0) {
FILE *fp = fopen((const char*)[fullPath UTF8String], "wb");
while (fp) {
if (readBytes > 0) {
fwrite(buffer, readBytes, 1, fp );
} else {
break;
}
readBytes = unzReadCurrentFile(zip, buffer, 4096);
}
fclose(fp);
if (preserveAttributes) {
// Set the original datetime property
if (fileInfo.dosDate != 0) {
NSDate *orgDate = [[self class] _dateWithMSDOSFormat:(UInt32)fileInfo.dosDate];
NSDictionary *attr = @{NSFileModificationDate: orgDate};
if (attr) {
if ([fileManager setAttributes:attr ofItemAtPath:fullPath error:nil] == NO) {
// Can't set attributes
NSLog(@"[SSZipArchive] Failed to set attributes - whilst setting modification date");
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 ]) {
[[NSFileManager defaultManager] removeItemAtPath:fullPath error:nil];
}
}
fclose(fp);
if (preserveAttributes) {
// Set the original datetime property
if (fileInfo.dosDate != 0) {
NSDate *orgDate = [[self class] _dateWithMSDOSFormat:(UInt32)fileInfo.dosDate];
NSDictionary *attr = @{NSFileModificationDate: orgDate};
if (attr) {
if ([fileManager setAttributes:attr ofItemAtPath:fullPath error:nil] == NO) {
// Can't set attributes
NSLog(@"[SSZipArchive] Failed to set attributes - whilst setting modification date");
}
}
}
}
// Set the original permissions on the file
uLong permissions = fileInfo.external_fa >> 16;
if (permissions != 0) {
// Store it into a NSNumber
NSNumber *permissionsValue = @(permissions);
// Retrieve any existing attributes
NSMutableDictionary *attrs = [[NSMutableDictionary alloc] initWithDictionary:[fileManager attributesOfItemAtPath:fullPath error:nil]];
// Set the original permissions on the file
uLong permissions = fileInfo.external_fa >> 16;
if (permissions != 0) {
// Store it into a NSNumber
NSNumber *permissionsValue = @(permissions);
// Set the value in the attributes dict
attrs[NSFilePosixPermissions] = permissionsValue;
// Retrieve any existing attributes
NSMutableDictionary *attrs = [[NSMutableDictionary alloc] initWithDictionary:[fileManager attributesOfItemAtPath:fullPath error:nil]];
// Update attributes
if ([fileManager setAttributes:attrs ofItemAtPath:fullPath error:nil] == NO) {
// Unable to set the permissions attribute
NSLog(@"[SSZipArchive] Failed to set attributes - whilst setting permissions");
}
// Set the value in the attributes dict
attrs[NSFilePosixPermissions] = permissionsValue;
// Update attributes
if ([fileManager setAttributes:attrs ofItemAtPath:fullPath error:nil] == NO) {
// Unable to set the permissions attribute
NSLog(@"[SSZipArchive] Failed to set attributes - whilst setting permissions");
}
#if !__has_feature(objc_arc)
[attrs release];
[attrs release];
#endif
}
}
}
}
else
{
// if we couldn't open file descriptor we can validate global errno to see the reason
if (errno == ENOSPC) {
NSError *enospcError = [NSError errorWithDomain:NSPOSIXErrorDomain
code:ENOSPC
userInfo:nil];
unzippingError = enospcError;
unzCloseCurrentFile(zip);
success = NO;
break;
else
{
// if we couldn't open file descriptor we can validate global errno to see the reason
if (errno == ENOSPC) {
NSError *enospcError = [NSError errorWithDomain:NSPOSIXErrorDomain
code:ENOSPC
userInfo:nil];
unzippingError = enospcError;
unzCloseCurrentFile(zip);
success = NO;
break;
}
}
}
}
@@ -514,11 +586,20 @@
}
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath withPassword:(nullable NSString *)password{
return [self createZipFileAtPath:path withContentsOfDirectory:directoryPath keepParentDirectory:NO withPassword:password];
return [SSZipArchive createZipFileAtPath:path withContentsOfDirectory:directoryPath keepParentDirectory:NO withPassword:password];
}
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(nullable NSString *)password{
return [SSZipArchive createZipFileAtPath:path
withContentsOfDirectory:directoryPath
keepParentDirectory:keepParentDirectory
withPassword:password
andProgressHandler:nil
];
}
+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(nullable NSString *)password andProgressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler {
BOOL success = NO;
NSFileManager *fileManager = nil;
@@ -528,8 +609,10 @@
// use a local filemanager (queue/thread compatibility)
fileManager = [[NSFileManager alloc] init];
NSDirectoryEnumerator *dirEnumerator = [fileManager enumeratorAtPath:directoryPath];
NSArray *allObjects = dirEnumerator.allObjects;
NSUInteger total = allObjects.count, complete = 0;
NSString *fileName;
while ((fileName = [dirEnumerator nextObject])) {
for (fileName in allObjects) {
BOOL isDir;
NSString *fullFilePath = [directoryPath stringByAppendingPathComponent:fileName];
[fileManager fileExistsAtPath:fullFilePath isDirectory:&isDir];
@@ -551,6 +634,10 @@
[zipArchive writeFileAtPath:tempFilePath withFileName:tempFileFilename withPassword:password];
}
}
complete++;
if (progressHandler) {
progressHandler(complete, total);
}
}
success = [zipArchive close];
}
@@ -711,7 +798,7 @@
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))
while(!feof(input) && !ferror(input))
{
len = (unsigned int) fread(buffer, 1, CHUNK, input);
zipWriteInFileInZip(_zip, buffer, len);
@@ -813,4 +900,4 @@
return date;
}
@end
@end

View File

@@ -1190,7 +1190,8 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
return UNZ_INTERNALERROR;
#ifdef HAVE_AES
if (s->cur_file_info.compression_method == AES_METHOD) {
unsigned char passverify[AES_PWVERIFYSIZE];
unsigned char passverify_archive[AES_PWVERIFYSIZE];
unsigned char passverify_password[AES_PWVERIFYSIZE];
unsigned char saltvalue[AES_MAXSALTLENGTH];
uInt saltlength;
@@ -1202,11 +1203,14 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
if (ZREAD64(s->z_filefunc, s->filestream, saltvalue, saltlength) != saltlength)
return UNZ_INTERNALERROR;
if (ZREAD64(s->z_filefunc, s->filestream, passverify, AES_PWVERIFYSIZE) != AES_PWVERIFYSIZE)
if (ZREAD64(s->z_filefunc, s->filestream, passverify_archive, AES_PWVERIFYSIZE) != AES_PWVERIFYSIZE)
return UNZ_INTERNALERROR;
fcrypt_init((int)s->cur_file_info_internal.aes_encryption_mode, (unsigned char *)password, (unsigned int)strlen(password), saltvalue,
passverify, &s->pfile_in_zip_read->aes_ctx);
fcrypt_init(s->cur_file_info_internal.aes_encryption_mode, password, strlen(password), saltvalue,
passverify_password, &s->pfile_in_zip_read->aes_ctx);
if (memcmp(passverify_archive, passverify_password, AES_PWVERIFYSIZE) != 0)
return UNZ_BADPASSWORD;
pfile_in_zip_read_info->rest_read_compressed -= saltlength + AES_PWVERIFYSIZE;
pfile_in_zip_read_info->rest_read_compressed -= AES_AUTHCODESIZE;

View File

@@ -57,6 +57,7 @@ typedef voidp unzFile;
#define UNZ_BADZIPFILE (-103)
#define UNZ_INTERNALERROR (-104)
#define UNZ_CRCERROR (-105)
#define UNZ_BADPASSWORD (-106)
/***************************************************************************/

View File

@@ -1,5 +1,5 @@
PODS:
- SSZipArchive (1.2)
- SSZipArchive (1.7)
DEPENDENCIES:
- SSZipArchive (from `..`)
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: ".."
SPEC CHECKSUMS:
SSZipArchive: 251093c65f98d6ea282c50bc404bfa631d9fd721
SSZipArchive: 63f8e11cfcc33e03e4cd666b4359ea8bd6facd0c
PODFILE CHECKSUM: 8d38f966bef0580b1feb382672c12ef6a674ea58
COCOAPODS: 1.0.1
COCOAPODS: 1.1.1

View File

@@ -7,7 +7,6 @@
objects = {
/* Begin PBXBuildFile section */
2B4B24671C21500E00CC99E5 /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE19391BDA7D8C00709011 /* mztools.c */; };
2B4B24681C21500E00CC99E5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE190E1BDA74F800709011 /* ViewController.swift */; };
2B4B24691C21500E00CC99E5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE190C1BDA74F800709011 /* AppDelegate.swift */; };
2B4B246D1C21500E00CC99E5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE19151BDA74F800709011 /* LaunchScreen.storyboard */; };
@@ -21,7 +20,6 @@
8DFE19141BDA74F800709011 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE19131BDA74F800709011 /* Assets.xcassets */; };
8DFE19171BDA74F800709011 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE19151BDA74F800709011 /* LaunchScreen.storyboard */; };
8DFE19221BDA74F800709011 /* SwiftExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE19211BDA74F800709011 /* SwiftExampleTests.swift */; };
8DFE19421BDA7D8D00709011 /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 8DFE19391BDA7D8C00709011 /* mztools.c */; };
8DFE19471BDA82EA00709011 /* Sample Data in Resources */ = {isa = PBXBuildFile; fileRef = 8DFE19461BDA82EA00709011 /* Sample Data */; };
9C98C3B4F9B653B83DA9D5F1 /* Pods_SwiftExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B957B9DCEA770A395AA9EF69 /* Pods_SwiftExample.framework */; };
/* End PBXBuildFile section */
@@ -51,18 +49,6 @@
8DFE191D1BDA74F800709011 /* SwiftExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8DFE19211BDA74F800709011 /* SwiftExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftExampleTests.swift; sourceTree = "<group>"; };
8DFE19231BDA74F800709011 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8DFE19341BDA7D8C00709011 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Common.h; sourceTree = "<group>"; };
8DFE19361BDA7D8C00709011 /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = "<group>"; };
8DFE19371BDA7D8C00709011 /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = "<group>"; };
8DFE19381BDA7D8C00709011 /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi.h; sourceTree = "<group>"; };
8DFE19391BDA7D8C00709011 /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mztools.c; sourceTree = "<group>"; };
8DFE193A1BDA7D8C00709011 /* mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mztools.h; sourceTree = "<group>"; };
8DFE193B1BDA7D8C00709011 /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unzip.c; sourceTree = "<group>"; };
8DFE193C1BDA7D8C00709011 /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unzip.h; sourceTree = "<group>"; };
8DFE193D1BDA7D8C00709011 /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip.c; sourceTree = "<group>"; };
8DFE193E1BDA7D8C00709011 /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = "<group>"; };
8DFE193F1BDA7D8C00709011 /* SSZipArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSZipArchive.h; sourceTree = "<group>"; };
8DFE19401BDA7D8D00709011 /* SSZipArchive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSZipArchive.m; sourceTree = "<group>"; };
8DFE19461BDA82EA00709011 /* Sample Data */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "Sample Data"; sourceTree = "<group>"; };
9F41DD1EB899AECA3DE54836 /* Pods-SwiftExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftExample/Pods-SwiftExample.debug.xcconfig"; sourceTree = "<group>"; };
B957B9DCEA770A395AA9EF69 /* Pods_SwiftExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -117,7 +103,6 @@
8DFE19001BDA74F800709011 = {
isa = PBXGroup;
children = (
8DFE19331BDA7D8C00709011 /* SSZipArchive */,
8DFE190B1BDA74F800709011 /* SwiftExample */,
8DFE19201BDA74F800709011 /* SwiftExampleTests */,
8DFE190A1BDA74F800709011 /* Products */,
@@ -159,34 +144,6 @@
path = SwiftExampleTests;
sourceTree = "<group>";
};
8DFE19331BDA7D8C00709011 /* SSZipArchive */ = {
isa = PBXGroup;
children = (
8DFE19341BDA7D8C00709011 /* Common.h */,
8DFE193F1BDA7D8C00709011 /* SSZipArchive.h */,
8DFE19401BDA7D8D00709011 /* SSZipArchive.m */,
8DFE19351BDA7D8C00709011 /* minizip */,
);
name = SSZipArchive;
path = ../SSZipArchive;
sourceTree = "<group>";
};
8DFE19351BDA7D8C00709011 /* minizip */ = {
isa = PBXGroup;
children = (
8DFE19361BDA7D8C00709011 /* crypt.h */,
8DFE19371BDA7D8C00709011 /* ioapi.c */,
8DFE19381BDA7D8C00709011 /* ioapi.h */,
8DFE19391BDA7D8C00709011 /* mztools.c */,
8DFE193A1BDA7D8C00709011 /* mztools.h */,
8DFE193B1BDA7D8C00709011 /* unzip.c */,
8DFE193C1BDA7D8C00709011 /* unzip.h */,
8DFE193D1BDA7D8C00709011 /* zip.c */,
8DFE193E1BDA7D8C00709011 /* zip.h */,
);
path = minizip;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -253,13 +210,15 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0710;
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0800;
TargetAttributes = {
8DFE19081BDA74F800709011 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0820;
};
8DFE191C1BDA74F800709011 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0820;
TestTargetID = 8DFE19081BDA74F800709011;
};
};
@@ -374,7 +333,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../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";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
@@ -384,7 +343,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2B4B24671C21500E00CC99E5 /* mztools.c in Sources */,
2B4B24681C21500E00CC99E5 /* ViewController.swift in Sources */,
2B4B24691C21500E00CC99E5 /* AppDelegate.swift in Sources */,
);
@@ -394,7 +352,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8DFE19421BDA7D8D00709011 /* mztools.c in Sources */,
8DFE190F1BDA74F800709011 /* ViewController.swift in Sources */,
8DFE190D1BDA74F800709011 /* AppDelegate.swift in Sources */,
);
@@ -451,6 +408,7 @@
OTHER_SWIFT_FLAGS = "-DUseCarthage";
PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SwiftExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
@@ -467,6 +425,7 @@
OTHER_SWIFT_FLAGS = "-DUseCarthage";
PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SwiftExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
@@ -483,8 +442,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -528,8 +489,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -548,6 +511,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -562,6 +526,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SwiftExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
@@ -574,6 +539,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SwiftExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
@@ -585,6 +551,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SwiftExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftExample.app/SwiftExample";
};
name = Debug;
@@ -597,6 +564,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.SwiftExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftExample.app/SwiftExample";
};
name = Release;

View File

@@ -14,30 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(application: UIApplication) {
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
func applicationDidEnterBackground(application: UIApplication) {
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(application: UIApplication) {
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(application: UIApplication) {
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(application: UIApplication) {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

View File

@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina5_5" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
@@ -13,10 +18,9 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>

View File

@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina5_5" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
@@ -15,50 +19,50 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Uwd-kM-cdh">
<rect key="frame" x="244" y="51" width="113" height="30"/>
<rect key="frame" x="150.66666666666669" y="51" width="113.00000000000006" height="30"/>
<state key="normal" title="Zip Sample Data"/>
<connections>
<action selector="zipPressed:" destination="BYZ-38-t0r" eventType="touchUpInside" id="dQS-RP-2Yl"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XUJ-IR-RIS">
<rect key="frame" x="235" y="89" width="131" height="30"/>
<rect key="frame" x="141.66666666666669" y="89" width="131.00000000000006" height="30"/>
<state key="normal" title="Unzip Sample Data"/>
<connections>
<action selector="unzipPressed:" destination="BYZ-38-t0r" eventType="touchUpInside" id="gGR-nU-aS3"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Lbq-oS-Rlj">
<rect key="frame" x="281" y="214" width="39" height="30"/>
<rect key="frame" x="187.66666666666666" y="212.66666666666666" width="39" height="30"/>
<state key="normal" title="Reset"/>
<connections>
<action selector="resetPressed:" destination="BYZ-38-t0r" eventType="touchUpInside" id="n8G-qy-egF"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="09F-6Q-slx" userLabel="File1">
<rect key="frame" x="67" y="127" width="480" height="21"/>
<rect key="frame" x="67" y="126.99999999999999" width="294" height="20.666666666666643"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PSK-Jd-Mwc" userLabel="File2">
<rect key="frame" x="67" y="156" width="480" height="21"/>
<rect key="frame" x="67" y="155.66666666666663" width="294" height="20.333333333333343"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pW5-rw-iqM" userLabel="File3">
<rect key="frame" x="67" y="185" width="480" height="21"/>
<rect key="frame" x="67" y="184" width="294" height="20.666666666666657"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="09F-6Q-slx" secondAttribute="trailing" constant="33" id="3S4-8t-aQA"/>
<constraint firstItem="XUJ-IR-RIS" firstAttribute="centerX" secondItem="Lbq-oS-Rlj" secondAttribute="centerX" id="AYF-iB-SJU"/>

View File

@@ -0,0 +1,9 @@
# 1
** This is a test **
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non ex turpis. Quisque quis porttitor nunc, sed sollicitudin urna. Aliquam ullamcorper ante fringilla ipsum feugiat egestas. Praesent a dapibus nisi. Proin dignissim non elit sit amet vestibulum. Proin et velit sit amet eros pretium maximus. Suspendisse potenti. Integer dolor felis, vehicula a ipsum vel, faucibus sodales nunc. Nam luctus nunc at malesuada pretium. Suspendisse nec leo in massa ultricies euismod at sed tortor. Nullam eleifend massa eget ultrices sollicitudin. Praesent id dolor vestibulum, mattis nisi ac, semper mi. Aenean justo dui, sollicitudin ut cursus eu, bibendum quis purus. Duis nec nisl augue.
In et leo in lacus ultricies congue. Sed quis erat ex. Proin tristique leo tincidunt justo hendrerit luctus. Nam mattis fringilla sapien a tincidunt. Nulla ultricies ut ex ac imperdiet. Proin tristique sit amet est nec facilisis. Donec rutrum mauris a pellentesque mollis. Cras blandit arcu at sem vulputate commodo. Mauris ipsum massa, hendrerit vitae cursus sed, malesuada at augue. Aenean nec nisi purus. In lacus mi, luctus id mattis vitae, lacinia sit amet mi. Mauris mollis convallis velit vel vestibulum. Praesent scelerisque eros tellus, sit amet varius massa eleifend et. Duis quis vehicula nisi, vel ultrices mi. Duis eu ipsum ac lorem dignissim semper vel sed nulla.
Aenean tempus placerat aliquam. Nam accumsan sapien eu ex pretium ullamcorper. Fusce ac risus tortor. Praesent gravida ultricies magna eu aliquam. Nam facilisis lobortis ante vitae imperdiet. Pellentesque metus quam, fermentum sed posuere sed, iaculis in tellus. Donec consequat dui vel nibh mollis porta. Proin sit amet consectetur nisl. Integer tellus justo, imperdiet commodo est at, condimentum viverra est. Maecenas nec erat pharetra, laoreet odio non, rhoncus felis. Curabitur id ex aliquam, mattis massa quis, facilisis ex.

View File

@@ -0,0 +1,7 @@
# Test # 2
** This is a second test file **
Morbi vel metus quis lorem tincidunt tempus sit amet quis magna. Nullam dolor dolor, eleifend in vestibulum nec, auctor at ipsum. Nullam viverra neque eros, a vehicula lacus tempus vitae. In sapien sapien, gravida mollis lectus sed, luctus egestas massa. Donec mollis tortor sit amet erat gravida ornare at sed felis. In ornare posuere velit, quis ultrices velit porta eget. Proin eu ultrices felis, eu finibus dolor. Quisque ultrices id libero at euismod. Sed mollis lacus id leo dignissim condimentum eget ac nunc. Vestibulum sed congue velit. Curabitur semper non lorem vel cursus. Ut sed augue purus. Sed sit amet faucibus ante, vel blandit justo. Duis id lacinia ex. Nullam pulvinar eget lacus in tristique. Nam et odio consequat, vehicula mauris ut, vulputate mi.
Pellentesque feugiat, nulla in dictum lacinia, risus sapien aliquam magna, vitae efficitur neque mauris sagittis neque. Etiam eu hendrerit erat. Vestibulum aliquet sapien sed fermentum ultricies. Maecenas eu risus nec turpis semper consequat. Cras nisl diam, consequat ut orci nec, rutrum cursus est. Quisque dictum nunc leo, lobortis lacinia nisl ultrices eget. Ut imperdiet eu libero quis blandit. Nunc blandit, leo quis rutrum auctor, ex tortor vehicula sem, eu ultrices ipsum mi vel arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;

View File

@@ -1,9 +0,0 @@
# China to ban ivory trade
**HONG KONG** — It could be the beginning of the end for the illicit trade in ivory.
Last month, on a state visit to Washington, Chinese President Xi Jinping promised to stop the commercial trade in ivory in his country but gave few details about the timing and extent of such a move.
Now, a senior U.S. government official says that the Chinese ban could be in place within a year or so, with very narrow exceptions, describing it as a “huge” deal.
Such a move, conservationists say, would be a major step toward ending the poaching crisis that is decimating Africas elephant herds.

View File

@@ -1,9 +0,0 @@
# Kerry in Syria
**VIENNA** — The war raging in Syria took center stage for Secretary of State John F. Kerry on Friday as he kicked off a series of meetings with diplomats seeking common ground on a strategy to resolve the grinding conflict.
But the foreign ministers of the three countries meeting with Kerry — Russia, Saudi Arabia and NATO-member Turkey — carry sharply competing views on how to proceed.
Saudi Arabia and Turkey, the neighboring country that has been overwhelmed with Syrian refugees, agree with Washington that Syrian President Bashar Al-Assad should eventually leave power.
Moscow is one of Assads biggest backers, and in recent weeks has positioned its military in Syria and conducted heavy airstrikes that have allowed Assads forces to resume ground offensives. The Russian military intervention also has alarmed the Pentagon, which is leading a separate air campaign against the Islamic State.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -29,6 +29,10 @@ class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
file1.text = ""
file2.text = ""
file3.text = ""
}
override func didReceiveMemoryWarning() {
@@ -39,13 +43,13 @@ class ViewController: UIViewController {
// MARK: IBAction
@IBAction func zipPressed(_: UIButton) {
let sampleDataPath = NSBundle.mainBundle().bundleURL.URLByAppendingPathComponent("Sample Data").path
let sampleDataPath = Bundle.main.bundleURL.appendingPathComponent("Sample Data").path
zipPath = tempZipPath()
let success = SSZipArchive.createZipFileAtPath(zipPath!, withContentsOfDirectory: sampleDataPath!)
let success = SSZipArchive.createZipFile(atPath: zipPath!, withContentsOfDirectory: sampleDataPath)
if success {
unzipButton.enabled = true
zipButton.enabled = false
unzipButton.isEnabled = true
zipButton.isEnabled = false
}
}
@@ -58,19 +62,19 @@ class ViewController: UIViewController {
return
}
let success = SSZipArchive.unzipFileAtPath(zipPath, toDestination: unzipPath)
let success = SSZipArchive.unzipFile(atPath: zipPath, toDestination: unzipPath)
if !success {
return
}
var items: [String]
do {
items = try NSFileManager.defaultManager().contentsOfDirectoryAtPath(unzipPath)
items = try FileManager.default.contentsOfDirectory(atPath: unzipPath)
} catch {
return
}
for (index, item) in items.enumerate() {
for (index, item) in items.enumerated() {
switch index {
case 0:
file1.text = item
@@ -83,43 +87,40 @@ class ViewController: UIViewController {
}
}
unzipButton.enabled = false
resetButton.enabled = true
unzipButton.isEnabled = false
resetButton.isEnabled = true
}
@IBAction func resetPressed(_: UIButton) {
file1.text = ""
file2.text = ""
file3.text = ""
zipButton.enabled = true
unzipButton.enabled = false
resetButton.enabled = false
zipButton.isEnabled = true
unzipButton.isEnabled = false
resetButton.isEnabled = false
}
// MARK: Private
func tempZipPath() -> String {
var path = NSSearchPathForDirectoriesInDomains(.CachesDirectory, .UserDomainMask, true)[0]
path += "/\(NSUUID().UUIDString).zip"
var path = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0]
path += "/\(UUID().uuidString).zip"
return path
}
func tempUnzipPath() -> String? {
var path = NSSearchPathForDirectoriesInDomains(.CachesDirectory, .UserDomainMask, true)[0]
path += "/\(NSUUID().UUIDString)"
let url = NSURL(fileURLWithPath: path)
var path = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0]
path += "/\(UUID().uuidString)"
let url = URL(fileURLWithPath: path)
do {
try NSFileManager.defaultManager().createDirectoryAtURL(url, withIntermediateDirectories: true, attributes: nil)
try FileManager.default.createDirectory(at: url, withIntermediateDirectories: true, attributes: nil)
} catch {
return nil
}
if let path = url.path {
return path
}
return nil
return url.path
}
}

View File

@@ -28,7 +28,7 @@ class SwiftExampleTests: XCTestCase {
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock {
self.measure {
// Put the code you want to measure the time of here.
}
}

View File

@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
01DB08731D88095600D335B9 /* SSZipCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 389869341D5BC30100F18782 /* SSZipCommon.h */; settings = {ATTRIBUTES = (Public, ); }; };
389869351D5BC30100F18782 /* SSZipCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 389869341D5BC30100F18782 /* SSZipCommon.h */; settings = {ATTRIBUTES = (Public, ); }; };
87ACF3EA1D2DAFAD00ED2F7E /* SSZipArchive+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87ACF3E91D2DAFAD00ED2F7E /* SSZipArchive+Swift.swift */; };
AFF75A2D1C3727F000F450AC /* ZipArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE4A1C0DF7950004A2F1 /* ZipArchive.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -230,6 +231,7 @@
AFF75A311C37281700F450AC /* aes.h in Headers */,
AFF75A3F1C37281700F450AC /* hmac.h in Headers */,
AFF75A3D1C37281700F450AC /* fileenc.h in Headers */,
01DB08731D88095600D335B9 /* SSZipCommon.h in Headers */,
AFF75A2D1C3727F000F450AC /* ZipArchive.h in Headers */,
AFF75A351C37281700F450AC /* aesopt.h in Headers */,
AFF75A381C37281700F450AC /* brg_endian.h in Headers */,
@@ -320,7 +322,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0820;
ORGANIZATIONNAME = smumryak;
TargetAttributes = {
AFF75A231C37279600F450AC = {
@@ -328,6 +330,7 @@
};
B423AE191C0DF76A0004A2F1 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0820;
};
};
};
@@ -469,8 +472,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
@@ -515,8 +520,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
@@ -535,6 +542,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
@@ -549,6 +557,7 @@
BITCODE_GENERATION_MODE = marker;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -561,6 +570,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
@@ -571,6 +581,7 @@
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -582,6 +593,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.ZipArchive;
PRODUCT_NAME = "$(PROJECT_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Release;
};

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"