Added targets for iOS and OS X static libraries; moved DIY tests to XCTest
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// Objective_ZipAppDelegate.h
|
||||
// Objective-Zip
|
||||
//
|
||||
// Created by Gianluca Bertani on 25/12/09.
|
||||
// Copyright Flying Dolphin Studio 2009. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
// * Neither the name of Gianluca Bertani nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class Objective_ZipViewController;
|
||||
|
||||
@interface Objective_ZipAppDelegate : NSObject <UIApplicationDelegate> {
|
||||
UIWindow *window;
|
||||
Objective_ZipViewController *viewController;
|
||||
}
|
||||
|
||||
@property (nonatomic, strong) IBOutlet UIWindow *window;
|
||||
@property (nonatomic, strong) IBOutlet Objective_ZipViewController *viewController;
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
//
|
||||
// Objective_ZipAppDelegate.m
|
||||
// Objective-Zip
|
||||
//
|
||||
// Created by Gianluca Bertani on 25/12/09.
|
||||
// Copyright Flying Dolphin Studio 2009. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
// * Neither the name of Gianluca Bertani nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#import "Objective_ZipAppDelegate.h"
|
||||
#import "Objective_ZipViewController.h"
|
||||
|
||||
@implementation Objective_ZipAppDelegate
|
||||
|
||||
@synthesize window;
|
||||
@synthesize viewController;
|
||||
|
||||
|
||||
- (void)applicationDidFinishLaunching:(UIApplication *)application {
|
||||
[window addSubview:viewController.view];
|
||||
[window makeKeyAndVisible];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,50 +0,0 @@
|
||||
//
|
||||
// Objective_ZipViewController.h
|
||||
// Objective-Zip
|
||||
//
|
||||
// Created by Gianluca Bertani on 25/12/09.
|
||||
// Copyright Flying Dolphin Studio 2009. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
// * Neither the name of Gianluca Bertani nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface Objective_ZipViewController : UIViewController {
|
||||
IBOutlet UITextView *_textView;
|
||||
|
||||
@private
|
||||
NSThread *_testThread;
|
||||
}
|
||||
|
||||
- (IBAction) zipUnzip;
|
||||
- (IBAction) zipUnzip2;
|
||||
- (IBAction) zipCheck1;
|
||||
- (IBAction) zipCheck2;
|
||||
- (IBAction) errorWrapping;
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,536 +0,0 @@
|
||||
//
|
||||
// Objective_ZipViewController.m
|
||||
// Objective-Zip
|
||||
//
|
||||
// Created by Gianluca Bertani on 25/12/09.
|
||||
// Copyright Flying Dolphin Studio 2009. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
// * Neither the name of Gianluca Bertani nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#import "Objective_ZipViewController.h"
|
||||
#import "Objective-Zip.h"
|
||||
|
||||
#define HUGE_TEST_BLOCK_LENGTH (50000)
|
||||
#define HUGE_TEST_NUMBER_OF_BLOCKS (100000)
|
||||
|
||||
|
||||
@interface Objective_ZipViewController ()
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Tests
|
||||
|
||||
- (void) test1;
|
||||
- (void) test2;
|
||||
- (void) test3;
|
||||
- (void) test4;
|
||||
- (void) test5;
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Logging
|
||||
|
||||
- (void) log:(NSString *)format, ...;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation Objective_ZipViewController
|
||||
|
||||
|
||||
- (void) loadView {
|
||||
[super loadView];
|
||||
|
||||
_textView.font= [UIFont fontWithName:@"Helvetica" size:11.0];
|
||||
}
|
||||
|
||||
|
||||
- (void) didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
}
|
||||
|
||||
- (IBAction) zipUnzip {
|
||||
|
||||
_testThread= [[NSThread alloc] initWithTarget:self selector:@selector(test1) object:nil];
|
||||
[_testThread start];
|
||||
}
|
||||
|
||||
- (IBAction) zipUnzip2 {
|
||||
|
||||
_testThread= [[NSThread alloc] initWithTarget:self selector:@selector(test2) object:nil];
|
||||
[_testThread start];
|
||||
}
|
||||
|
||||
- (IBAction) zipCheck1 {
|
||||
|
||||
_testThread= [[NSThread alloc] initWithTarget:self selector:@selector(test3) object:nil];
|
||||
[_testThread start];
|
||||
}
|
||||
|
||||
- (IBAction) zipCheck2 {
|
||||
|
||||
_testThread= [[NSThread alloc] initWithTarget:self selector:@selector(test4) object:nil];
|
||||
[_testThread start];
|
||||
}
|
||||
|
||||
- (IBAction) errorWrapping {
|
||||
|
||||
_testThread= [[NSThread alloc] initWithTarget:self selector:@selector(test5) object:nil];
|
||||
[_testThread start];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Test 1: zip & unzip
|
||||
|
||||
- (void) test1 {
|
||||
@autoreleasepool {
|
||||
|
||||
NSString *documentsDir= [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
|
||||
NSString *filePath= [documentsDir stringByAppendingPathComponent:@"test.zip"];
|
||||
|
||||
@try {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
|
||||
[self log:@"Test 1: opening zip file for writing..."];
|
||||
|
||||
OZZipFile *zipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeCreate];
|
||||
|
||||
[self log:@"Test 1: adding first file..."];
|
||||
|
||||
OZZipWriteStream *stream1= [zipFile writeFileInZipWithName:@"abc.txt" fileDate:[NSDate dateWithTimeIntervalSinceNow:-86400.0] compressionLevel:OZZipCompressionLevelBest];
|
||||
|
||||
[self log:@"Test 1: writing to first file's stream..."];
|
||||
|
||||
NSString *text= @"abc";
|
||||
[stream1 writeData:[text dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
|
||||
[self log:@"Test 1: closing first file's stream..."];
|
||||
|
||||
[stream1 finishedWriting];
|
||||
|
||||
[self log:@"Test 1: adding second file..."];
|
||||
|
||||
NSString *file2name= @"x/y/z/xyz.txt";
|
||||
OZZipWriteStream *stream2= [zipFile writeFileInZipWithName:file2name compressionLevel:OZZipCompressionLevelNone];
|
||||
|
||||
[self log:@"Test 1: writing to second file's stream..."];
|
||||
|
||||
NSString *text2= @"XYZ";
|
||||
[stream2 writeData:[text2 dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
|
||||
[self log:@"Test 1: closing second file's stream..."];
|
||||
|
||||
[stream2 finishedWriting];
|
||||
|
||||
[self log:@"Test 1: closing zip file..."];
|
||||
|
||||
[zipFile close];
|
||||
|
||||
[self log:@"Test 1: opening zip file for reading..."];
|
||||
|
||||
OZZipFile *unzipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeUnzip];
|
||||
|
||||
[self log:@"Test 1: reading file infos..."];
|
||||
|
||||
NSArray *infos= [unzipFile listFileInZipInfos];
|
||||
for (OZFileInZipInfo *info in infos)
|
||||
[self log:@"Test 1: - %@ %@ %d (%d)", info.name, info.date, info.size, info.level];
|
||||
|
||||
[self log:@"Test 1: opening first file..."];
|
||||
|
||||
[unzipFile goToFirstFileInZip];
|
||||
OZZipReadStream *read1= [unzipFile readCurrentFileInZip];
|
||||
|
||||
[self log:@"Test 1: reading from first file's stream..."];
|
||||
|
||||
NSMutableData *data1= [[NSMutableData alloc] initWithLength:256];
|
||||
NSUInteger bytesRead1= [read1 readDataWithBuffer:data1];
|
||||
|
||||
BOOL ok= NO;
|
||||
if (bytesRead1 == 3) {
|
||||
NSString *fileText1= [[NSString alloc] initWithBytes:[data1 bytes] length:bytesRead1 encoding:NSUTF8StringEncoding];
|
||||
if ([fileText1 isEqualToString:@"abc"])
|
||||
ok= YES;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
[self log:@"Test 1: content of first file is OK"];
|
||||
else
|
||||
[self log:@"Test 1: content of first file is WRONG"];
|
||||
|
||||
[self log:@"Test 1: closing first file's stream..."];
|
||||
|
||||
[read1 finishedReading];
|
||||
|
||||
[self log:@"Test 1: opening second file..."];
|
||||
|
||||
[unzipFile locateFileInZip:file2name];
|
||||
OZZipReadStream *read2= [unzipFile readCurrentFileInZip];
|
||||
|
||||
[self log:@"Test 1: reading from second file's stream..."];
|
||||
|
||||
NSMutableData *data2= [[NSMutableData alloc] initWithLength:256];
|
||||
NSUInteger bytesRead2= [read2 readDataWithBuffer:data2];
|
||||
|
||||
ok= NO;
|
||||
if (bytesRead2 == 3) {
|
||||
NSString *fileText2= [[NSString alloc] initWithBytes:[data2 bytes] length:bytesRead2 encoding:NSUTF8StringEncoding];
|
||||
if ([fileText2 isEqualToString:@"XYZ"])
|
||||
ok= YES;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
[self log:@"Test 1: content of second file is OK"];
|
||||
else
|
||||
[self log:@"Test 1: content of second file is WRONG"];
|
||||
|
||||
[self log:@"Test 1: closing second file's stream..."];
|
||||
|
||||
[read2 finishedReading];
|
||||
|
||||
[self log:@"Test 1: closing zip file..."];
|
||||
|
||||
[unzipFile close];
|
||||
|
||||
[self log:@"Test 1: test terminated succesfully"];
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
[self log:@"Test 1: caught a ZipException (see logs), terminating..."];
|
||||
|
||||
NSLog(@"Test 1: ZipException caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
} @catch (id e) {
|
||||
[self log:@"Test 1: caught a generic exception (see logs), terminating..."];
|
||||
|
||||
NSLog(@"Test 1: Exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
} @finally {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Test 2: zip & unzip 5 GB
|
||||
|
||||
- (void) test2 {
|
||||
@autoreleasepool {
|
||||
|
||||
NSString *documentsDir= [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
|
||||
NSString *filePath= [documentsDir stringByAppendingPathComponent:@"huge_test.zip"];
|
||||
|
||||
@try {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
|
||||
[self log:@"Test 2: opening zip file for writing..."];
|
||||
|
||||
OZZipFile *zipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeCreate];
|
||||
|
||||
[self log:@"Test 2: adding file..."];
|
||||
|
||||
OZZipWriteStream *stream= [zipFile writeFileInZipWithName:@"huge_file.txt" compressionLevel:OZZipCompressionLevelBest];
|
||||
|
||||
[self log:@"Test 2: writing to file's stream..."];
|
||||
|
||||
NSMutableData *data= [[NSMutableData alloc] initWithLength:HUGE_TEST_BLOCK_LENGTH];
|
||||
SecRandomCopyBytes(kSecRandomDefault, [data length], [data mutableBytes]);
|
||||
|
||||
NSData *checkData= [data subdataWithRange:NSMakeRange(0, 100)];
|
||||
|
||||
NSMutableData *buffer= [[NSMutableData alloc] initWithLength:HUGE_TEST_BLOCK_LENGTH]; // For use later
|
||||
|
||||
for (int i= 0; i < HUGE_TEST_NUMBER_OF_BLOCKS; i++) {
|
||||
[stream writeData:data];
|
||||
|
||||
if (i % 100 == 0)
|
||||
[self log:@"Test 2: written %d KB...", ([data length] / 1024) * (i +1)];
|
||||
}
|
||||
|
||||
[self log:@"Test 2: closing file's stream..."];
|
||||
|
||||
[stream finishedWriting];
|
||||
|
||||
[self log:@"Test 2: closing zip file..."];
|
||||
|
||||
[zipFile close];
|
||||
|
||||
[self log:@"Test 2: opening zip file for reading..."];
|
||||
|
||||
OZZipFile *unzipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeUnzip];
|
||||
|
||||
[self log:@"Test 2: opening file..."];
|
||||
|
||||
[unzipFile goToFirstFileInZip];
|
||||
OZZipReadStream *read= [unzipFile readCurrentFileInZip];
|
||||
|
||||
[self log:@"Test 2: reading from file's stream..."];
|
||||
|
||||
for (int i= 0; i < HUGE_TEST_NUMBER_OF_BLOCKS; i++) {
|
||||
NSUInteger bytesRead= [read readDataWithBuffer:buffer];
|
||||
|
||||
BOOL ok= NO;
|
||||
if (bytesRead == [data length]) {
|
||||
NSRange range= [buffer rangeOfData:checkData options:0 range:NSMakeRange(0, [buffer length])];
|
||||
if (range.location == 0)
|
||||
ok= YES;
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
[self log:@"Test 2: content of file is WRONG at position %d KB", ([buffer length] / 1024) * i];
|
||||
|
||||
if (i % 100 == 0)
|
||||
[self log:@"Test 2: read %d KB...", ([buffer length] / 1024) * (i +1)];
|
||||
}
|
||||
|
||||
[self log:@"Test 2: closing file's stream..."];
|
||||
|
||||
[read finishedReading];
|
||||
|
||||
[self log:@"Test 2: closing zip file..."];
|
||||
|
||||
[unzipFile close];
|
||||
|
||||
[self log:@"Test 2: test terminated succesfully"];
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
[self log:@"Test 2: caught a ZipException (see logs), terminating..."];
|
||||
|
||||
NSLog(@"Test 2: ZipException caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
} @catch (id e) {
|
||||
[self log:@"Test 2: caught a generic exception (see logs), terminating..."];
|
||||
|
||||
NSLog(@"Test 2: Exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
} @finally {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Test 3: unzip & check Mac zip file
|
||||
|
||||
- (void) test3 {
|
||||
@autoreleasepool {
|
||||
|
||||
NSString *filePath= [[NSBundle mainBundle] pathForResource:@"mac_test_file" ofType:@"zip"];
|
||||
|
||||
@try {
|
||||
[self log:@"Test 3: opening zip file for reading..."];
|
||||
|
||||
OZZipFile *unzipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeUnzip];
|
||||
|
||||
[self log:@"Test 3: opening file..."];
|
||||
|
||||
[unzipFile goToFirstFileInZip];
|
||||
OZZipReadStream *read= [unzipFile readCurrentFileInZip];
|
||||
|
||||
[self log:@"Test 3: reading from file's stream..."];
|
||||
|
||||
NSMutableData *buffer= [[NSMutableData alloc] initWithLength:1024];
|
||||
|
||||
NSUInteger bytesRead= [read readDataWithBuffer:buffer];
|
||||
|
||||
NSString *fileText= [[NSString alloc] initWithBytes:[buffer bytes] length:bytesRead encoding:NSUTF8StringEncoding];
|
||||
if ([fileText isEqualToString:@"Objective-Zip Mac test file\n"])
|
||||
[self log:@"Test 3: content of Mac file is OK"];
|
||||
else
|
||||
[self log:@"Test 3: content of Mac file is WRONG"];
|
||||
|
||||
[self log:@"Test 3: closing file's stream..."];
|
||||
|
||||
[read finishedReading];
|
||||
|
||||
[self log:@"Test 3: closing zip file..."];
|
||||
|
||||
[unzipFile close];
|
||||
|
||||
[self log:@"Test 3: test terminated succesfully"];
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
[self log:@"Test 3: caught a ZipException (see logs), terminating..."];
|
||||
|
||||
NSLog(@"Test 3: ZipException caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
} @catch (id e) {
|
||||
[self log:@"Test 3: caught a generic exception (see logs), terminating..."];
|
||||
|
||||
NSLog(@"Test 3: Exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Test 4: unzip & check Win zip file
|
||||
|
||||
- (void) test4 {
|
||||
@autoreleasepool {
|
||||
|
||||
NSString *filePath= [[NSBundle mainBundle] pathForResource:@"win_test_file" ofType:@"zip"];
|
||||
|
||||
@try {
|
||||
[self log:@"Test 4: opening zip file for reading..."];
|
||||
|
||||
OZZipFile *unzipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeUnzip];
|
||||
|
||||
[self log:@"Test 4: opening file..."];
|
||||
|
||||
[unzipFile goToFirstFileInZip];
|
||||
OZZipReadStream *read= [unzipFile readCurrentFileInZip];
|
||||
|
||||
[self log:@"Test 4: reading from file's stream..."];
|
||||
|
||||
NSMutableData *buffer= [[NSMutableData alloc] initWithLength:1024];
|
||||
|
||||
NSUInteger bytesRead= [read readDataWithBuffer:buffer];
|
||||
|
||||
NSString *fileText= [[NSString alloc] initWithBytes:[buffer bytes] length:bytesRead encoding:NSUTF8StringEncoding];
|
||||
if ([fileText isEqualToString:@"Objective-Zip Windows test file\r\n"])
|
||||
[self log:@"Test 4: content of Win file is OK"];
|
||||
else
|
||||
[self log:@"Test 4: content of Win file is WRONG"];
|
||||
|
||||
[self log:@"Test 4: closing file's stream..."];
|
||||
|
||||
[read finishedReading];
|
||||
|
||||
[self log:@"Test 4: closing zip file..."];
|
||||
|
||||
[unzipFile close];
|
||||
|
||||
[self log:@"Test 4: test terminated succesfully"];
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
[self log:@"Test 4: caught a ZipException (see logs), terminating..."];
|
||||
|
||||
NSLog(@"Test 4: ZipException caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
} @catch (id e) {
|
||||
[self log:@"Test 4: caught a generic exception (see logs), terminating..."];
|
||||
|
||||
NSLog(@"Test 4: Exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Test 5: error wrapping
|
||||
|
||||
- (void) test5 {
|
||||
@autoreleasepool {
|
||||
|
||||
NSString *filePath= @"/root.zip";
|
||||
|
||||
@try {
|
||||
[self log:@"Test 5: opening impossible zip file for writing..."];
|
||||
|
||||
OZZipFile *zipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeCreate];
|
||||
|
||||
[self log:@"Test 5: test failed, no error reported"];
|
||||
|
||||
[zipFile close];
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
if (ze.error != ERROR_NO_SUCH_FILE) {
|
||||
[self log:@"Test 5: test failed, wrong error reported"];
|
||||
|
||||
} else {
|
||||
[self log:@"Test 5: correct error reported"];
|
||||
}
|
||||
|
||||
} @catch (id e) {
|
||||
[self log:@"Test 5: caught a generic exception (see logs)"];
|
||||
|
||||
NSLog(@"Test 5: Exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
}
|
||||
|
||||
@try {
|
||||
[self log:@"Test 5: opening again impossible zip file for writing..."];
|
||||
|
||||
NSError *error= nil;
|
||||
OZZipFile *zipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeCreate error:&error];
|
||||
|
||||
if (zipFile || (!error)) {
|
||||
[self log:@"Test 5: test failed, no error reported"];
|
||||
|
||||
[zipFile close];
|
||||
|
||||
} else {
|
||||
if (error.code != ERROR_NO_SUCH_FILE) {
|
||||
[self log:@"Test 5: test failed, wrong error reported"];
|
||||
|
||||
} else {
|
||||
[self log:@"Test 5: correct error reported"];
|
||||
[self log:@"Test 5: test terminated succesfully"];
|
||||
}
|
||||
}
|
||||
|
||||
} @catch (id e) {
|
||||
[self log:@"Test 5: caught a generic exception (see logs), terminating..."];
|
||||
|
||||
NSLog(@"Test 5: Exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Logging
|
||||
|
||||
- (void) log:(NSString *)format, ... {
|
||||
|
||||
// Variable arguments formatting
|
||||
va_list arguments;
|
||||
va_start(arguments, format);
|
||||
NSString *logLine= [[NSString alloc] initWithFormat:format arguments:arguments];
|
||||
va_end(arguments);
|
||||
|
||||
[self performSelectorOnMainThread:@selector(printLog:) withObject:logLine waitUntilDone:YES];
|
||||
|
||||
}
|
||||
|
||||
- (void) printLog:(NSString *)logLine {
|
||||
NSLog(@"%@", logLine);
|
||||
|
||||
_textView.text= [_textView.text stringByAppendingString:logLine];
|
||||
_textView.text= [_textView.text stringByAppendingString:@"\n"];
|
||||
|
||||
NSRange range;
|
||||
range.location= [_textView.text length] -6;
|
||||
range.length= 5;
|
||||
[_textView scrollRangeToVisible:range];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 408 KiB |
-219
@@ -1,219 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">784</int>
|
||||
<string key="IBDocument.SystemVersion">10A394</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">732</string>
|
||||
<string key="IBDocument.AppKitVersion">1027.1</string>
|
||||
<string key="IBDocument.HIToolboxVersion">430.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">60</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="10"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBProxyObject" id="841351856">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="427554174">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
</object>
|
||||
<object class="IBUICustomObject" id="664661524"/>
|
||||
<object class="IBUIViewController" id="943309135">
|
||||
<string key="IBUINibName">Objective_ZipViewController</string>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
</object>
|
||||
<object class="IBUIWindow" id="117978783">
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{320, 480}</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MSAxIDEAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="664661524"/>
|
||||
</object>
|
||||
<int key="connectionID">4</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">viewController</string>
|
||||
<reference key="source" ref="664661524"/>
|
||||
<reference key="destination" ref="943309135"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">window</string>
|
||||
<reference key="source" ref="664661524"/>
|
||||
<reference key="destination" ref="117978783"/>
|
||||
</object>
|
||||
<int key="connectionID">14</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="841351856"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="664661524"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">Objective_Zip App Delegate</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="427554174"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">10</int>
|
||||
<reference key="object" ref="943309135"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">12</int>
|
||||
<reference key="object" ref="117978783"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.CustomClassName</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>10.CustomClassName</string>
|
||||
<string>10.IBEditorWindowLastContentRect</string>
|
||||
<string>10.IBPluginDependency</string>
|
||||
<string>12.IBEditorWindowLastContentRect</string>
|
||||
<string>12.IBPluginDependency</string>
|
||||
<string>3.CustomClassName</string>
|
||||
<string>3.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIApplication</string>
|
||||
<string>UIResponder</string>
|
||||
<string>Objective_ZipViewController</string>
|
||||
<string>{{512, 351}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>{{525, 346}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>Objective_ZipAppDelegate</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">14</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">Objective_ZipAppDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>viewController</string>
|
||||
<string>window</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>Objective_ZipViewController</string>
|
||||
<string>UIWindow</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/Objective_ZipAppDelegate.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">Objective_ZipAppDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">Objective_ZipViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/Objective_ZipViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3100" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<string key="IBDocument.LastKnownRelativeProjectPath">Objective-Zip.xcodeproj</string>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">3.1</string>
|
||||
</data>
|
||||
</archive>
|
||||
@@ -3,28 +3,22 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>ObjectiveZipIcon.png</string>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>com.flyingdolphinstudio.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainWindow</string>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,449 @@
|
||||
//
|
||||
// ObjectiveZip_Tests.m
|
||||
// Objective-Zip
|
||||
//
|
||||
// Created by Gianluca Bertani on 29/08/15.
|
||||
//
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "Objective-Zip.h"
|
||||
|
||||
#define HUGE_TEST_BLOCK_LENGTH (50000)
|
||||
#define HUGE_TEST_NUMBER_OF_BLOCKS (100000)
|
||||
|
||||
#define MAC_TEST_ZIP (@"UEsDBBQACAAIAPWF10IAAAAAAAAAAAAAAAANABAAdGVzdF9maWxlLnR4dFVYDACQCsdRjQrHUfYB9gHzT8pKTS7JLEvVjcosUPBNTFYoSS0uUUjLzEnlAgBQSwcIlXE92h4AAAAcAAAAUEsDBAoAAAAAAACG10IAAAAAAAAAAAAAAAAJABAAX19NQUNPU1gvVVgMAKAKx1GgCsdR9gH2AVBLAwQUAAgACAD1hddCAAAAAAAAAAAAAAAAGAAQAF9fTUFDT1NYLy5fdGVzdF9maWxlLnR4dFVYDACQCsdRjQrHUfYB9gFjYBVjZ2BiYPBNTFbwD1aIUIACkBgDJxAbAXElEIP4qxmIAo4hIUFQJkjHHCDmR1PCiBAXT87P1UssKMhJ1QtJrShxzUvOT8nMSwdKlpak6VpYGxqbGBmaW1qYAABQSwcIcBqNwF0AAACrAAAAUEsBAhUDFAAIAAgA9YXXQpVxPdoeAAAAHAAAAA0ADAAAAAAAAAAAQKSBAAAAAHRlc3RfZmlsZS50eHRVWAgAkArHUY0Kx1FQSwECFQMKAAAAAAAAhtdCAAAAAAAAAAAAAAAACQAMAAAAAAAAAABA/UFpAAAAX19NQUNPU1gvVVgIAKAKx1GgCsdRUEsBAhUDFAAIAAgA9YXXQnAajcBdAAAAqwAAABgADAAAAAAAAAAAQKSBoAAAAF9fTUFDT1NYLy5fdGVzdF9maWxlLnR4dFVYCACQCsdRjQrHUVBLBQYAAAAAAwADANwAAABTAQAAAAA=")
|
||||
#define WIN_TEST_ZIP (@"UEsDBBQAAAAAAMmF10L4VbPKIQAAACEAAAANAAAAdGVzdF9maWxlLnR4dE9iamVjdGl2ZS1aaXAgV2luZG93cyB0ZXN0IGZpbGUNClBLAQIUABQAAAAAAMmF10L4VbPKIQAAACEAAAANAAAAAAAAAAEAIAAAAAAAAAB0ZXN0X2ZpbGUudHh0UEsFBgAAAAABAAEAOwAAAEwAAAAAAA==")
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark ObjectiveZip_Tests declaration
|
||||
|
||||
@interface ObjectiveZip_Tests : XCTestCase
|
||||
@end
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark ObjectiveZip_Tests implementation
|
||||
|
||||
@implementation ObjectiveZip_Tests
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Set up and tear down
|
||||
|
||||
- (void) setUp {
|
||||
[super setUp];
|
||||
}
|
||||
|
||||
- (void) tearDown {
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Tests
|
||||
|
||||
- (void) test01ZipAndUnzip {
|
||||
NSString *documentsDir= [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
|
||||
NSString *filePath= [documentsDir stringByAppendingPathComponent:@"test.zip"];
|
||||
|
||||
@try {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
|
||||
NSLog(@"Test 1: opening zip file for writing...");
|
||||
|
||||
OZZipFile *zipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeCreate];
|
||||
|
||||
XCTAssertNotNil(zipFile);
|
||||
|
||||
NSLog(@"Test 1: adding first file...");
|
||||
|
||||
OZZipWriteStream *stream1= [zipFile writeFileInZipWithName:@"abc.txt" fileDate:[NSDate dateWithTimeIntervalSinceNow:-86400.0] compressionLevel:OZZipCompressionLevelBest];
|
||||
|
||||
XCTAssertNotNil(stream1);
|
||||
|
||||
NSLog(@"Test 1: writing to first file's stream...");
|
||||
|
||||
NSString *text= @"abc";
|
||||
[stream1 writeData:[text dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
|
||||
NSLog(@"Test 1: closing first file's stream...");
|
||||
|
||||
[stream1 finishedWriting];
|
||||
|
||||
NSLog(@"Test 1: adding second file...");
|
||||
|
||||
NSString *file2name= @"x/y/z/xyz.txt";
|
||||
OZZipWriteStream *stream2= [zipFile writeFileInZipWithName:file2name compressionLevel:OZZipCompressionLevelNone];
|
||||
|
||||
XCTAssertNotNil(stream2);
|
||||
|
||||
NSLog(@"Test 1: writing to second file's stream...");
|
||||
|
||||
NSString *text2= @"XYZ";
|
||||
[stream2 writeData:[text2 dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
|
||||
NSLog(@"Test 1: closing second file's stream...");
|
||||
|
||||
[stream2 finishedWriting];
|
||||
|
||||
NSLog(@"Test 1: closing zip file...");
|
||||
|
||||
[zipFile close];
|
||||
|
||||
NSLog(@"Test 1: opening zip file for reading...");
|
||||
|
||||
OZZipFile *unzipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeUnzip];
|
||||
|
||||
XCTAssertNotNil(unzipFile);
|
||||
|
||||
NSLog(@"Test 1: reading file infos...");
|
||||
|
||||
NSArray *infos= [unzipFile listFileInZipInfos];
|
||||
|
||||
XCTAssertEqual(2, infos.count);
|
||||
|
||||
OZFileInZipInfo *info1= [infos objectAtIndex:0];
|
||||
|
||||
XCTAssertEqualWithAccuracy([[NSDate date] timeIntervalSinceReferenceDate], [info1.date timeIntervalSinceReferenceDate] + 86400, 5.0);
|
||||
|
||||
NSLog(@"Test 1: - %@ %@ %lu (%d)", info1.name, info1.date, (unsigned long) info1.size, info1.level);
|
||||
|
||||
OZFileInZipInfo *info2= [infos objectAtIndex:1];
|
||||
|
||||
XCTAssertEqualWithAccuracy([[NSDate date] timeIntervalSinceReferenceDate], [info2.date timeIntervalSinceReferenceDate], 5.0);
|
||||
|
||||
NSLog(@"Test 1: - %@ %@ %lu (%d)", info2.name, info2.date, (unsigned long) info2.size, info2.level);
|
||||
|
||||
NSLog(@"Test 1: opening first file...");
|
||||
|
||||
[unzipFile goToFirstFileInZip];
|
||||
OZZipReadStream *read1= [unzipFile readCurrentFileInZip];
|
||||
|
||||
XCTAssertNotNil(read1);
|
||||
|
||||
NSLog(@"Test 1: reading from first file's stream...");
|
||||
|
||||
NSMutableData *data1= [[NSMutableData alloc] initWithLength:256];
|
||||
NSUInteger bytesRead1= [read1 readDataWithBuffer:data1];
|
||||
|
||||
XCTAssertEqual(3, bytesRead1);
|
||||
|
||||
NSString *fileText1= [[NSString alloc] initWithBytes:[data1 bytes] length:bytesRead1 encoding:NSUTF8StringEncoding];
|
||||
|
||||
XCTAssertEqualObjects(@"abc", fileText1);
|
||||
|
||||
NSLog(@"Test 1: closing first file's stream...");
|
||||
|
||||
[read1 finishedReading];
|
||||
|
||||
NSLog(@"Test 1: opening second file...");
|
||||
|
||||
[unzipFile locateFileInZip:file2name];
|
||||
OZZipReadStream *read2= [unzipFile readCurrentFileInZip];
|
||||
|
||||
XCTAssertNotNil(read2);
|
||||
|
||||
NSLog(@"Test 1: reading from second file's stream...");
|
||||
|
||||
NSMutableData *data2= [[NSMutableData alloc] initWithLength:256];
|
||||
NSUInteger bytesRead2= [read2 readDataWithBuffer:data2];
|
||||
|
||||
XCTAssertEqual(3, bytesRead1);
|
||||
|
||||
NSString *fileText2= [[NSString alloc] initWithBytes:[data2 bytes] length:bytesRead2 encoding:NSUTF8StringEncoding];
|
||||
|
||||
XCTAssertEqualObjects(@"XYZ", fileText2);
|
||||
|
||||
NSLog(@"Test 1: closing second file's stream...");
|
||||
|
||||
[read2 finishedReading];
|
||||
|
||||
NSLog(@"Test 1: closing zip file...");
|
||||
|
||||
[unzipFile close];
|
||||
|
||||
NSLog(@"Test 1: test terminated succesfully");
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
NSLog(@"Test 1: zip exception caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
XCTFail(@"Zip exception caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
} @catch (NSException *e) {
|
||||
NSLog(@"Test 1: generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
XCTFail(@"Generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
} @finally {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) test02ZipAndUnzip5GB {
|
||||
|
||||
#warning Remove to enable this test, but be careful: takes 5 minutes and consumes 5 GB of disk space
|
||||
return;
|
||||
|
||||
NSString *documentsDir= [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
|
||||
NSString *filePath= [documentsDir stringByAppendingPathComponent:@"huge_test.zip"];
|
||||
|
||||
@try {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
|
||||
NSLog(@"Test 2: opening zip file for writing...");
|
||||
|
||||
OZZipFile *zipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeCreate];
|
||||
|
||||
XCTAssertNotNil(zipFile);
|
||||
|
||||
NSLog(@"Test 2: adding file...");
|
||||
|
||||
OZZipWriteStream *stream= [zipFile writeFileInZipWithName:@"huge_file.txt" compressionLevel:OZZipCompressionLevelBest];
|
||||
|
||||
XCTAssertNotNil(stream);
|
||||
|
||||
NSLog(@"Test 2: writing to file's stream...");
|
||||
|
||||
NSMutableData *data= [[NSMutableData alloc] initWithLength:HUGE_TEST_BLOCK_LENGTH];
|
||||
SecRandomCopyBytes(kSecRandomDefault, [data length], [data mutableBytes]);
|
||||
|
||||
NSData *checkData= [data subdataWithRange:NSMakeRange(0, 100)];
|
||||
|
||||
NSMutableData *buffer= [[NSMutableData alloc] initWithLength:HUGE_TEST_BLOCK_LENGTH]; // For use later
|
||||
|
||||
for (int i= 0; i < HUGE_TEST_NUMBER_OF_BLOCKS; i++) {
|
||||
[stream writeData:data];
|
||||
|
||||
if (i % 100 == 0)
|
||||
NSLog(@"Test 2: written %lu KB...", ([data length] / 1024) * (i +1));
|
||||
}
|
||||
|
||||
NSLog(@"Test 2: closing file's stream...");
|
||||
|
||||
[stream finishedWriting];
|
||||
|
||||
NSLog(@"Test 2: closing zip file...");
|
||||
|
||||
[zipFile close];
|
||||
|
||||
NSLog(@"Test 2: opening zip file for reading...");
|
||||
|
||||
OZZipFile *unzipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeUnzip];
|
||||
|
||||
XCTAssertNotNil(unzipFile);
|
||||
|
||||
NSLog(@"Test 2: opening file...");
|
||||
|
||||
[unzipFile goToFirstFileInZip];
|
||||
OZZipReadStream *read= [unzipFile readCurrentFileInZip];
|
||||
|
||||
XCTAssertNotNil(read);
|
||||
|
||||
NSLog(@"Test 2: reading from file's stream...");
|
||||
|
||||
for (int i= 0; i < HUGE_TEST_NUMBER_OF_BLOCKS; i++) {
|
||||
NSUInteger bytesRead= [read readDataWithBuffer:buffer];
|
||||
|
||||
XCTAssertEqual([data length], bytesRead);
|
||||
|
||||
NSRange range= [buffer rangeOfData:checkData options:0 range:NSMakeRange(0, [buffer length])];
|
||||
|
||||
XCTAssertEqual(0, range.location);
|
||||
|
||||
if (i % 100 == 0)
|
||||
NSLog(@"Test 2: read %lu KB...", ([buffer length] / 1024) * (i +1));
|
||||
}
|
||||
|
||||
NSLog(@"Test 2: closing file's stream...");
|
||||
|
||||
[read finishedReading];
|
||||
|
||||
NSLog(@"Test 2: closing zip file...");
|
||||
|
||||
[unzipFile close];
|
||||
|
||||
NSLog(@"Test 2: test terminated succesfully");
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
NSLog(@"Test 2: zip exception caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
XCTFail(@"Zip exception caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
} @catch (NSException *e) {
|
||||
NSLog(@"Test 2: generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
XCTFail(@"Generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
} @finally {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) test03UnzipMacZipFile {
|
||||
NSString *documentsDir= [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
|
||||
NSString *filePath= [documentsDir stringByAppendingPathComponent:@"mac_test_file.zip"];
|
||||
|
||||
NSData *macZipData= [[NSData alloc] initWithBase64EncodedString:MAC_TEST_ZIP options:0];
|
||||
[macZipData writeToFile:filePath atomically:NO];
|
||||
|
||||
@try {
|
||||
NSLog(@"Test 3: opening zip file for reading...");
|
||||
|
||||
OZZipFile *unzipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeUnzip];
|
||||
|
||||
XCTAssertNotNil(unzipFile);
|
||||
|
||||
NSLog(@"Test 3: opening file...");
|
||||
|
||||
[unzipFile goToFirstFileInZip];
|
||||
OZZipReadStream *read= [unzipFile readCurrentFileInZip];
|
||||
|
||||
XCTAssertNotNil(read);
|
||||
|
||||
NSLog(@"Test 3: reading from file's stream...");
|
||||
|
||||
NSMutableData *buffer= [[NSMutableData alloc] initWithLength:1024];
|
||||
|
||||
NSUInteger bytesRead= [read readDataWithBuffer:buffer];
|
||||
|
||||
NSString *fileText= [[NSString alloc] initWithBytes:[buffer bytes] length:bytesRead encoding:NSUTF8StringEncoding];
|
||||
|
||||
XCTAssertEqualObjects(@"Objective-Zip Mac test file\n", fileText);
|
||||
|
||||
NSLog(@"Test 3: closing file's stream...");
|
||||
|
||||
[read finishedReading];
|
||||
|
||||
NSLog(@"Test 3: closing zip file...");
|
||||
|
||||
[unzipFile close];
|
||||
|
||||
NSLog(@"Test 3: test terminated succesfully");
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
NSLog(@"Test 3: zip exception caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
XCTFail(@"Zip exception caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
} @catch (NSException *e) {
|
||||
NSLog(@"Test 3: generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
XCTFail(@"Generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
} @finally {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) test04UnzipWinZipFile {
|
||||
NSString *documentsDir= [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
|
||||
NSString *filePath= [documentsDir stringByAppendingPathComponent:@"win_test_file.zip"];
|
||||
|
||||
NSData *winZipData= [[NSData alloc] initWithBase64EncodedString:WIN_TEST_ZIP options:0];
|
||||
[winZipData writeToFile:filePath atomically:NO];
|
||||
|
||||
@try {
|
||||
NSLog(@"Test 4: opening zip file for reading...");
|
||||
|
||||
OZZipFile *unzipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeUnzip];
|
||||
|
||||
XCTAssertNotNil(unzipFile);
|
||||
|
||||
NSLog(@"Test 4: opening file...");
|
||||
|
||||
[unzipFile goToFirstFileInZip];
|
||||
OZZipReadStream *read= [unzipFile readCurrentFileInZip];
|
||||
|
||||
XCTAssertNotNil(read);
|
||||
|
||||
NSLog(@"Test 4: reading from file's stream...");
|
||||
|
||||
NSMutableData *buffer= [[NSMutableData alloc] initWithLength:1024];
|
||||
|
||||
NSUInteger bytesRead= [read readDataWithBuffer:buffer];
|
||||
|
||||
NSString *fileText= [[NSString alloc] initWithBytes:[buffer bytes] length:bytesRead encoding:NSUTF8StringEncoding];
|
||||
|
||||
XCTAssertEqualObjects(@"Objective-Zip Windows test file\r\n", fileText);
|
||||
|
||||
NSLog(@"Test 4: closing file's stream...");
|
||||
|
||||
[read finishedReading];
|
||||
|
||||
NSLog(@"Test 4: closing zip file...");
|
||||
|
||||
[unzipFile close];
|
||||
|
||||
NSLog(@"Test 4: test terminated succesfully");
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
NSLog(@"Test 4: zip exception caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
XCTFail(@"Zip exception caught: %ld - %@", (long) ze.error, [ze reason]);
|
||||
|
||||
} @catch (NSException *e) {
|
||||
NSLog(@"Test 4: generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
XCTFail(@"Generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
} @finally {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) test05ErrorWrapping {
|
||||
NSString *filePath= @"/root.zip";
|
||||
|
||||
@try {
|
||||
NSLog(@"Test 5: opening impossible zip file for writing...");
|
||||
|
||||
OZZipFile *zipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeCreate];
|
||||
|
||||
[zipFile close];
|
||||
|
||||
NSLog(@"Test 5: test failed, no error reported");
|
||||
|
||||
XCTFail(@"No error reported");
|
||||
|
||||
} @catch (OZZipException *ze) {
|
||||
|
||||
XCTAssertEqual(ERROR_NO_SUCH_FILE, ze.error);
|
||||
|
||||
} @catch (NSException *e) {
|
||||
NSLog(@"Test 5: generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
XCTFail(@"Generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
} @finally {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
}
|
||||
|
||||
@try {
|
||||
NSLog(@"Test 5: opening again impossible zip file for writing...");
|
||||
|
||||
NSError *error= nil;
|
||||
OZZipFile *zipFile= [[OZZipFile alloc] initWithFileName:filePath mode:OZZipFileModeCreate error:&error];
|
||||
|
||||
[zipFile close];
|
||||
|
||||
XCTAssertNil(zipFile);
|
||||
XCTAssertNotNil(error);
|
||||
XCTAssertEqual(ERROR_NO_SUCH_FILE, error.code);
|
||||
|
||||
NSLog(@"Test 5: test terminated succesfully");
|
||||
|
||||
} @catch (NSException *e) {
|
||||
NSLog(@"Test 5: generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
XCTFail(@"Generic exception caught: %@ - %@", [[e class] description], [e description]);
|
||||
|
||||
} @finally {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
@@ -1,554 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1296</int>
|
||||
<string key="IBDocument.SystemVersion">14F27</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">7706</string>
|
||||
<string key="IBDocument.AppKitVersion">1348.17</string>
|
||||
<string key="IBDocument.HIToolboxVersion">758.70</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">7703</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUIButton</string>
|
||||
<string>IBUITextView</string>
|
||||
<string>IBUIView</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="843779117">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="774585933">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIButton" id="422324197">
|
||||
<reference key="NSNextResponder" ref="774585933"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{20, 20}, {280, 37}}</string>
|
||||
<reference key="NSSuperview" ref="774585933"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="690801101"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<object class="NSColor" key="IBUINormalTitleColor" id="803445480">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUIHighlightedTitleColor" id="884333554">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<string key="IBUINormalTitle">Zip & Unzip</string>
|
||||
<object class="NSColor" key="IBUINormalTitleShadowColor" id="114389561">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription" id="975473552">
|
||||
<string key="name">Helvetica-Bold</string>
|
||||
<string key="family">Helvetica</string>
|
||||
<int key="traits">2</int>
|
||||
<double key="pointSize">15</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont" id="64712977">
|
||||
<string key="NSName">Helvetica-Bold</string>
|
||||
<double key="NSSize">15</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIButton" id="416200362">
|
||||
<reference key="NSNextResponder" ref="774585933"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{20, 196}, {280, 37}}</string>
|
||||
<reference key="NSSuperview" ref="774585933"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="261814878"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<reference key="IBUINormalTitleColor" ref="803445480"/>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="884333554"/>
|
||||
<string key="IBUINormalTitle">Error Wrapping</string>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="114389561"/>
|
||||
<reference key="IBUIFontDescription" ref="975473552"/>
|
||||
<reference key="IBUIFont" ref="64712977"/>
|
||||
</object>
|
||||
<object class="IBUIButton" id="690801101">
|
||||
<reference key="NSNextResponder" ref="774585933"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{20, 64}, {280, 37}}</string>
|
||||
<reference key="NSSuperview" ref="774585933"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1005186811"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<reference key="IBUINormalTitleColor" ref="803445480"/>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="884333554"/>
|
||||
<string key="IBUINormalTitle">5 GB Zip & Unzip (use with caution)</string>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="114389561"/>
|
||||
<reference key="IBUIFontDescription" ref="975473552"/>
|
||||
<reference key="IBUIFont" ref="64712977"/>
|
||||
</object>
|
||||
<object class="IBUIButton" id="1005186811">
|
||||
<reference key="NSNextResponder" ref="774585933"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{20, 108}, {280, 37}}</string>
|
||||
<reference key="NSSuperview" ref="774585933"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="68194376"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<reference key="IBUINormalTitleColor" ref="803445480"/>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="884333554"/>
|
||||
<string key="IBUINormalTitle">Unzip & Check Mac OS X Zip File</string>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="114389561"/>
|
||||
<reference key="IBUIFontDescription" ref="975473552"/>
|
||||
<reference key="IBUIFont" ref="64712977"/>
|
||||
</object>
|
||||
<object class="IBUIButton" id="68194376">
|
||||
<reference key="NSNextResponder" ref="774585933"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{20, 152}, {280, 37}}</string>
|
||||
<reference key="NSSuperview" ref="774585933"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="416200362"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<reference key="IBUINormalTitleColor" ref="803445480"/>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="884333554"/>
|
||||
<string key="IBUINormalTitle">Unzip & Check Windows Zip File</string>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="114389561"/>
|
||||
<reference key="IBUIFontDescription" ref="975473552"/>
|
||||
<reference key="IBUIFont" ref="64712977"/>
|
||||
</object>
|
||||
<object class="IBUIView" id="261814878">
|
||||
<reference key="NSNextResponder" ref="774585933"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{20, 243}, {280, 197}}</string>
|
||||
<reference key="NSSuperview" ref="774585933"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="718446055"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<float key="IBUIAlpha">0.5</float>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUITextView" id="718446055">
|
||||
<reference key="NSNextResponder" ref="774585933"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{20, 243}, {280, 197}}</string>
|
||||
<reference key="NSSuperview" ref="774585933"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
|
||||
<bool key="IBUIDelaysContentTouches">NO</bool>
|
||||
<bool key="IBUICanCancelContentTouches">NO</bool>
|
||||
<bool key="IBUIBouncesZoom">NO</bool>
|
||||
<bool key="IBUIEditable">NO</bool>
|
||||
<string key="IBUIText"/>
|
||||
<reference key="IBUITextColor" ref="884333554"/>
|
||||
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">1</int>
|
||||
<int key="weightCategory">0</int>
|
||||
<double key="pointSize">17</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">HelveticaNeue</string>
|
||||
<double key="NSSize">17</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="422324197"/>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedSizeMetrics" key="IBUISimulatedDestinationMetrics">
|
||||
<string key="IBUISimulatedSizeMetricsClass">IBUISimulatedFreeformSizeMetricsSentinel</string>
|
||||
<string key="IBUIDisplayName">Freeform</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="774585933"/>
|
||||
</object>
|
||||
<int key="connectionID">7</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">_textView</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="718446055"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">zipUnzip</string>
|
||||
<reference key="source" ref="422324197"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">14</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">zipUnzip2</string>
|
||||
<reference key="source" ref="690801101"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">17</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">zipCheck1</string>
|
||||
<reference key="source" ref="1005186811"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">22</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">zipCheck2</string>
|
||||
<reference key="source" ref="68194376"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">23</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">errorWrapping</string>
|
||||
<reference key="source" ref="416200362"/>
|
||||
<reference key="destination" ref="843779117"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">26</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="843779117"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="774585933"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="422324197"/>
|
||||
<reference ref="261814878"/>
|
||||
<reference ref="718446055"/>
|
||||
<reference ref="1005186811"/>
|
||||
<reference ref="68194376"/>
|
||||
<reference ref="416200362"/>
|
||||
<reference ref="690801101"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">8</int>
|
||||
<reference key="object" ref="422324197"/>
|
||||
<reference key="parent" ref="774585933"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">9</int>
|
||||
<reference key="object" ref="261814878"/>
|
||||
<array class="NSMutableArray" key="children"/>
|
||||
<reference key="parent" ref="774585933"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">10</int>
|
||||
<reference key="object" ref="718446055"/>
|
||||
<reference key="parent" ref="774585933"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">15</int>
|
||||
<reference key="object" ref="690801101"/>
|
||||
<reference key="parent" ref="774585933"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">18</int>
|
||||
<reference key="object" ref="1005186811"/>
|
||||
<reference key="parent" ref="774585933"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">19</int>
|
||||
<reference key="object" ref="68194376"/>
|
||||
<reference key="parent" ref="774585933"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">24</int>
|
||||
<reference key="object" ref="416200362"/>
|
||||
<reference key="parent" ref="774585933"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">Objective_ZipViewController</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="15.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="18.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="24.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<reference key="6.IBNSViewMetadataGestureRecognizers" ref="0"/>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">26</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">Objective_ZipViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="errorWrapping">id</string>
|
||||
<string key="zipCheck1">id</string>
|
||||
<string key="zipCheck2">id</string>
|
||||
<string key="zipUnzip">id</string>
|
||||
<string key="zipUnzip2">id</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||
<object class="IBActionInfo" key="errorWrapping">
|
||||
<string key="name">errorWrapping</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="zipCheck1">
|
||||
<string key="name">zipCheck1</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="zipCheck2">
|
||||
<string key="name">zipCheck2</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="zipUnzip">
|
||||
<string key="name">zipUnzip</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="zipUnzip2">
|
||||
<string key="name">zipUnzip2</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">_textView</string>
|
||||
<string key="NS.object.0">UITextView</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">_textView</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">_textView</string>
|
||||
<string key="candidateClassName">UITextView</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">../Classes/Objective_ZipViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">Objective_ZipViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="errorWrapping">id</string>
|
||||
<string key="zipCheck1">id</string>
|
||||
<string key="zipCheck2">id</string>
|
||||
<string key="zipUnzip">id</string>
|
||||
<string key="zipUnzip2">id</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||
<object class="IBActionInfo" key="errorWrapping">
|
||||
<string key="name">errorWrapping</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="zipCheck1">
|
||||
<string key="name">zipCheck1</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="zipCheck2">
|
||||
<string key="name">zipCheck2</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="zipUnzip">
|
||||
<string key="name">zipUnzip</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="zipUnzip2">
|
||||
<string key="name">zipUnzip2</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">../Classes/Objective_ZipViewController.m</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIButton</string>
|
||||
<string key="superclassName">UIControl</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIControl</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIGestureRecognizer</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIGestureRecognizer.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIResponder</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIScrollView</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISearchBar</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISearchDisplayController</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UITextView</string>
|
||||
<string key="superclassName">UIScrollView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITextView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIView</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
<integer value="4600" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
</data>
|
||||
</archive>
|
||||
@@ -1,9 +0,0 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'Objective-Zip' target in the 'Objective-Zip' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Security/Security.h>
|
||||
#endif
|
||||
Binary file not shown.
@@ -1,41 +0,0 @@
|
||||
//
|
||||
// main.m
|
||||
// Objective-Zip
|
||||
//
|
||||
// Created by Gianluca Bertani on 25/12/09.
|
||||
// Copyright Flying Dolphin Studio 2009. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
// * Neither the name of Gianluca Bertani nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
@autoreleasepool {
|
||||
int retVal = UIApplicationMain(argc, argv, nil, nil);
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user