Compare commits
72 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3fdfed61a | ||
|
|
83e12647c7 | ||
|
|
bca3071c70 | ||
|
|
841fd2ea2e | ||
|
|
005717dcd9 | ||
|
|
aaaf20c60b | ||
|
|
965e97dab4 | ||
|
|
2df54985de | ||
|
|
244d20f17f | ||
|
|
06da04803a | ||
|
|
1a9738db0e | ||
|
|
8e7cc4eeaa | ||
|
|
5869cd2f6f | ||
|
|
85e38f376e | ||
|
|
a7a9c28973 | ||
|
|
e4697c5a66 | ||
|
|
eeded9e86d | ||
|
|
421c1b4ccc | ||
|
|
f0a9965fa7 | ||
|
|
34101c011b | ||
|
|
37f21d93d0 | ||
|
|
b99e680aaf | ||
|
|
96b49ffae5 | ||
|
|
f87799f92c | ||
|
|
2ca4264756 | ||
|
|
2e975c2895 | ||
|
|
84a96fc298 | ||
|
|
57ea2842ac | ||
|
|
c8eee45526 | ||
|
|
02248d8d04 | ||
|
|
a363be72d7 | ||
|
|
5d903ee581 | ||
|
|
254172f351 | ||
|
|
d7751a54f5 | ||
|
|
58cd06b7d8 | ||
|
|
4fcec5bf76 | ||
|
|
4a2bc37c7a | ||
|
|
7bac3fb757 | ||
|
|
97cd6424fd | ||
|
|
0c98af7f9e | ||
|
|
3952b05eb3 | ||
|
|
54e447185d | ||
|
|
73fb2132a8 | ||
|
|
39ebc12bc8 | ||
|
|
a13812407b | ||
|
|
df48275b02 | ||
|
|
46ebe69295 | ||
|
|
c08241ef19 | ||
|
|
76ca4b3293 | ||
|
|
2ad2d02a81 | ||
|
|
ab77a21ffc | ||
|
|
96577a06c8 | ||
|
|
39b3500120 | ||
|
|
f4c0147086 | ||
|
|
9dae2eca4a | ||
|
|
650c6fb0ab | ||
|
|
edc099d6be | ||
|
|
81c8672414 | ||
|
|
df34c1b896 | ||
|
|
79fd869347 | ||
|
|
38c24c156a | ||
|
|
e764d19b9e | ||
|
|
3c06f00fee | ||
|
|
d1e5f47e29 | ||
|
|
503373bc53 | ||
|
|
988b828240 | ||
|
|
a4b4c9711d | ||
|
|
391c6e75bb | ||
|
|
ecdb034302 | ||
|
|
a0155be07f | ||
|
|
677b83cd96 | ||
|
|
6d0ac40a80 |
@@ -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
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
8DFE19E21BDA9FF300709011 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0710;
|
||||
LastUpgradeCheck = 0820;
|
||||
TargetAttributes = {
|
||||
8DFE19E91BDA9FF300709011 = {
|
||||
CreatedOnToolsVersion = 7.1;
|
||||
@@ -345,7 +345,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;
|
||||
};
|
||||
486F364061BAD3921A1CA2C8 /* [CP] Embed Pods Frameworks */ = {
|
||||
@@ -390,7 +390,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;
|
||||
};
|
||||
CA0F9A9BDCCC5F900FD55CF3 /* [CP] Embed Pods Frameworks */ = {
|
||||
@@ -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";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0730"
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
9
ObjectiveCExample/ObjectiveCExample/Sample Data/1.md
Executable file
9
ObjectiveCExample/ObjectiveCExample/Sample Data/1.md
Executable 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.
|
||||
7
ObjectiveCExample/ObjectiveCExample/Sample Data/2.md
Executable file
7
ObjectiveCExample/ObjectiveCExample/Sample Data/2.md
Executable 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;
|
||||
@@ -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 Africa’s elephant herds.
|
||||
@@ -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 Assad’s biggest backers, and in recent weeks has positioned its military in Syria and conducted heavy airstrikes that have allowed Assad’s 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.
|
||||
BIN
ObjectiveCExample/ObjectiveCExample/Sample Data/mountain.png
Normal file
BIN
ObjectiveCExample/ObjectiveCExample/Sample Data/mountain.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
@@ -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];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- SSZipArchive (1.4)
|
||||
- SSZipArchive (1.7)
|
||||
|
||||
DEPENDENCIES:
|
||||
- SSZipArchive (from `..`)
|
||||
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
|
||||
:path: ".."
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
SSZipArchive: bab21000ee11b7ba68d5880bcd87d80e4eb93e65
|
||||
SSZipArchive: 63f8e11cfcc33e03e4cd666b4359ea8bd6facd0c
|
||||
|
||||
PODFILE CHECKSUM: ae5fb993e5dc339b15e10067d1e60549fa585f32
|
||||
|
||||
COCOAPODS: 1.0.1
|
||||
COCOAPODS: 1.1.1
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'SSZipArchive'
|
||||
s.version = '1.4'
|
||||
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'
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#define _SSZIPARCHIVE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "Common.h"
|
||||
#include "SSZipCommon.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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]);
|
||||
@@ -252,7 +321,15 @@
|
||||
}
|
||||
|
||||
// Check if it contains directory
|
||||
NSString *strPath = @(filename);
|
||||
// NSString * strPath = @(filename);
|
||||
NSString * strPath = [NSString stringWithCString:filename encoding:NSUTF8StringEncoding];
|
||||
//if filename contains chinese dir transform Encoding
|
||||
if (!strPath) {
|
||||
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
|
||||
strPath = [NSString stringWithCString:filename encoding:enc];
|
||||
}
|
||||
//end by skyfox
|
||||
|
||||
BOOL isDirectory = NO;
|
||||
if (filename[fileInfo.size_filename-1] == '/' || filename[fileInfo.size_filename-1] == '\\') {
|
||||
isDirectory = YES;
|
||||
@@ -296,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -506,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;
|
||||
@@ -520,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];
|
||||
@@ -543,6 +634,10 @@
|
||||
[zipArchive writeFileAtPath:tempFilePath withFileName:tempFileFilename withPassword:password];
|
||||
}
|
||||
}
|
||||
complete++;
|
||||
if (progressHandler) {
|
||||
progressHandler(complete, total);
|
||||
}
|
||||
}
|
||||
success = [zipArchive close];
|
||||
}
|
||||
@@ -703,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);
|
||||
@@ -805,4 +900,4 @@
|
||||
return date;
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
|
||||
@@ -78,4 +78,4 @@ typedef struct unz_global_info64
|
||||
unsigned long size_comment; /* size of the global comment of the zipfile */
|
||||
} unz_global_info64;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -17,4 +17,3 @@ FOUNDATION_EXPORT const unsigned char ZipArchiveVersionString[];
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <ZipArchive/PublicHeader.h>
|
||||
|
||||
#import "SSZipArchive.h"
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "zlib.h"
|
||||
#include "unzip.h"
|
||||
|
||||
#include "Common.h"
|
||||
#include "SSZipCommon.h"
|
||||
|
||||
#ifdef STDC
|
||||
# include <stddef.h>
|
||||
@@ -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;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
See the accompanying LICENSE file for the full text of the license.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "SSZipCommon.h"
|
||||
|
||||
#ifndef _UNZ_H
|
||||
#define _UNZ_H
|
||||
@@ -57,6 +57,7 @@ typedef voidp unzFile;
|
||||
#define UNZ_BADZIPFILE (-103)
|
||||
#define UNZ_INTERNALERROR (-104)
|
||||
#define UNZ_CRCERROR (-105)
|
||||
#define UNZ_BADPASSWORD (-106)
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:.
|
||||
}
|
||||
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
9
SwiftExample/SwiftExample/Sample Data/1.md
Normal file
9
SwiftExample/SwiftExample/Sample Data/1.md
Normal 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.
|
||||
7
SwiftExample/SwiftExample/Sample Data/2.md
Normal file
7
SwiftExample/SwiftExample/Sample Data/2.md
Normal 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;
|
||||
@@ -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 Africa’s elephant herds.
|
||||
@@ -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 Assad’s biggest backers, and in recent weeks has positioned its military in Syria and conducted heavy airstrikes that have allowed Assad’s 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.
|
||||
BIN
SwiftExample/SwiftExample/Sample Data/mountain.png
Normal file
BIN
SwiftExample/SwiftExample/Sample Data/mountain.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
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, ); }; };
|
||||
AFF75A2E1C37280200F450AC /* SSZipArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE481C0DF7950004A2F1 /* SSZipArchive.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
AFF75A2F1C37280200F450AC /* SSZipArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = B423AE491C0DF7950004A2F1 /* SSZipArchive.m */; };
|
||||
AFF75A301C37280900F450AC /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE3C1C0DF7950004A2F1 /* Common.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
AFF75A311C37281700F450AC /* aes.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE271C0DF7950004A2F1 /* aes.h */; };
|
||||
AFF75A321C37281700F450AC /* aes_via_ace.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE281C0DF7950004A2F1 /* aes_via_ace.h */; };
|
||||
AFF75A331C37281700F450AC /* aescrypt.c in Sources */ = {isa = PBXBuildFile; fileRef = B423AE291C0DF7950004A2F1 /* aescrypt.c */; };
|
||||
@@ -64,7 +65,6 @@
|
||||
B423AE5D1C0DF7950004A2F1 /* pwd2key.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE391C0DF7950004A2F1 /* pwd2key.h */; };
|
||||
B423AE5E1C0DF7950004A2F1 /* sha1.c in Sources */ = {isa = PBXBuildFile; fileRef = B423AE3A1C0DF7950004A2F1 /* sha1.c */; };
|
||||
B423AE5F1C0DF7950004A2F1 /* sha1.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE3B1C0DF7950004A2F1 /* sha1.h */; };
|
||||
B423AE601C0DF7950004A2F1 /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE3C1C0DF7950004A2F1 /* Common.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B423AE621C0DF7950004A2F1 /* crypt.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE3F1C0DF7950004A2F1 /* crypt.h */; };
|
||||
B423AE631C0DF7950004A2F1 /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = B423AE401C0DF7950004A2F1 /* ioapi.c */; };
|
||||
B423AE641C0DF7950004A2F1 /* ioapi.h in Headers */ = {isa = PBXBuildFile; fileRef = B423AE411C0DF7950004A2F1 /* ioapi.h */; };
|
||||
@@ -81,6 +81,7 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
389869341D5BC30100F18782 /* SSZipCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSZipCommon.h; sourceTree = "<group>"; };
|
||||
87ACF3E91D2DAFAD00ED2F7E /* SSZipArchive+Swift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "SSZipArchive+Swift.swift"; sourceTree = "<group>"; };
|
||||
AFF75A241C37279600F450AC /* ZipArchive.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ZipArchive.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
B423AE1A1C0DF76A0004A2F1 /* ZipArchive.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ZipArchive.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -105,7 +106,6 @@
|
||||
B423AE391C0DF7950004A2F1 /* pwd2key.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pwd2key.h; sourceTree = "<group>"; };
|
||||
B423AE3A1C0DF7950004A2F1 /* sha1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sha1.c; sourceTree = "<group>"; };
|
||||
B423AE3B1C0DF7950004A2F1 /* sha1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sha1.h; sourceTree = "<group>"; };
|
||||
B423AE3C1C0DF7950004A2F1 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Common.h; sourceTree = "<group>"; };
|
||||
B423AE3D1C0DF7950004A2F1 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
B423AE3F1C0DF7950004A2F1 /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = "<group>"; };
|
||||
B423AE401C0DF7950004A2F1 /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = "<group>"; };
|
||||
@@ -163,8 +163,8 @@
|
||||
B423AE251C0DF7950004A2F1 /* SSZipArchive */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
389869341D5BC30100F18782 /* SSZipCommon.h */,
|
||||
B423AE261C0DF7950004A2F1 /* aes */,
|
||||
B423AE3C1C0DF7950004A2F1 /* Common.h */,
|
||||
B423AE3D1C0DF7950004A2F1 /* Info.plist */,
|
||||
B423AE3E1C0DF7950004A2F1 /* minizip */,
|
||||
B423AE481C0DF7950004A2F1 /* SSZipArchive.h */,
|
||||
@@ -231,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 */,
|
||||
@@ -239,7 +240,6 @@
|
||||
AFF75A451C37281700F450AC /* sha1.h in Headers */,
|
||||
AFF75A4C1C37282700F450AC /* unzip.h in Headers */,
|
||||
AFF75A4A1C37282700F450AC /* mztools.h in Headers */,
|
||||
AFF75A301C37280900F450AC /* Common.h in Headers */,
|
||||
AFF75A371C37281700F450AC /* aestab.h in Headers */,
|
||||
AFF75A3B1C37281700F450AC /* entropy.h in Headers */,
|
||||
AFF75A481C37282700F450AC /* ioapi.h in Headers */,
|
||||
@@ -254,8 +254,8 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
B423AE6D1C0DF7950004A2F1 /* ZipArchive.h in Headers */,
|
||||
B423AE601C0DF7950004A2F1 /* Common.h in Headers */,
|
||||
B423AE6B1C0DF7950004A2F1 /* SSZipArchive.h in Headers */,
|
||||
389869351D5BC30100F18782 /* SSZipCommon.h in Headers */,
|
||||
B423AE6A1C0DF7950004A2F1 /* zip.h in Headers */,
|
||||
B423AE5F1C0DF7950004A2F1 /* sha1.h in Headers */,
|
||||
B423AE551C0DF7950004A2F1 /* entropy.h in Headers */,
|
||||
@@ -322,7 +322,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0730;
|
||||
LastUpgradeCheck = 0710;
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = smumryak;
|
||||
TargetAttributes = {
|
||||
AFF75A231C37279600F450AC = {
|
||||
@@ -330,6 +330,7 @@
|
||||
};
|
||||
B423AE191C0DF76A0004A2F1 = {
|
||||
CreatedOnToolsVersion = 7.1.1;
|
||||
LastSwiftMigration = 0820;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -471,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;
|
||||
@@ -517,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;
|
||||
@@ -537,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";
|
||||
@@ -551,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;
|
||||
@@ -563,6 +570,7 @@
|
||||
PRODUCT_NAME = "$(PROJECT_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -573,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;
|
||||
@@ -584,6 +593,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.samsoffes.ZipArchive;
|
||||
PRODUCT_NAME = "$(PROJECT_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
Reference in New Issue
Block a user