From c08241ef192458cd82c33863d7225da84e39b1aa Mon Sep 17 00:00:00 2001 From: Felix Ritter Date: Sat, 5 Nov 2016 15:14:30 +0100 Subject: [PATCH 1/7] added isPasswordValidForArchiveAtPath method --- SSZipArchive/SSZipArchive.h | 1 + SSZipArchive/SSZipArchive.m | 69 +++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/SSZipArchive/SSZipArchive.h b/SSZipArchive/SSZipArchive.h index 3931bc4..8c4b8b2 100755 --- a/SSZipArchive/SSZipArchive.h +++ b/SSZipArchive/SSZipArchive.h @@ -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; diff --git a/SSZipArchive/SSZipArchive.m b/SSZipArchive/SSZipArchive.m index 1b9d073..eaba315 100755 --- a/SSZipArchive/SSZipArchive.m +++ b/SSZipArchive/SSZipArchive.m @@ -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 From 46ebe692957c393f9b822e53bc4fb537018b5ff3 Mon Sep 17 00:00:00 2001 From: Felix Ritter Date: Sat, 5 Nov 2016 15:16:16 +0100 Subject: [PATCH 2/7] Ensure we are not creating stale file entries in unzipFileAtPath --- SSZipArchive/SSZipArchive.m | 119 ++++++++++++++++++------------------ 1 file changed, 61 insertions(+), 58 deletions(-) diff --git a/SSZipArchive/SSZipArchive.m b/SSZipArchive/SSZipArchive.m index eaba315..22009d4 100755 --- a/SSZipArchive/SSZipArchive.m +++ b/SSZipArchive/SSZipArchive.m @@ -373,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; + } } } } From df48275b0263e2c1ebf7727e745718d471e5b878 Mon Sep 17 00:00:00 2001 From: Felix Ritter Date: Sat, 5 Nov 2016 15:19:45 +0100 Subject: [PATCH 3/7] Added bad password detection for AES from minizip master --- SSZipArchive/minizip/unzip.c | 12 ++++++++---- SSZipArchive/minizip/unzip.h | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/SSZipArchive/minizip/unzip.c b/SSZipArchive/minizip/unzip.c index 4b8eabc..35aaf88 100755 --- a/SSZipArchive/minizip/unzip.c +++ b/SSZipArchive/minizip/unzip.c @@ -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; diff --git a/SSZipArchive/minizip/unzip.h b/SSZipArchive/minizip/unzip.h index 7b614ff..d6954d3 100755 --- a/SSZipArchive/minizip/unzip.h +++ b/SSZipArchive/minizip/unzip.h @@ -57,6 +57,7 @@ typedef voidp unzFile; #define UNZ_BADZIPFILE (-103) #define UNZ_INTERNALERROR (-104) #define UNZ_CRCERROR (-105) +#define UNZ_BADPASSWORD (-106) /***************************************************************************/ From a13812407b7aa8fe918d2de4a92cf4053cee6c1c Mon Sep 17 00:00:00 2001 From: Bartosz Polaczyk Date: Wed, 9 Nov 2016 10:55:14 +0100 Subject: [PATCH 4/7] Define NSError as nullable argument of completionHandler In order to expose it as Error? in Swift3 rather than Error --- SSZipArchive/SSZipArchive.h | 4 ++-- SSZipArchive/SSZipArchive.m | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SSZipArchive/SSZipArchive.h b/SSZipArchive/SSZipArchive.h index 3931bc4..9972ffd 100755 --- a/SSZipArchive/SSZipArchive.h +++ b/SSZipArchive/SSZipArchive.h @@ -39,14 +39,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 diff --git a/SSZipArchive/SSZipArchive.m b/SSZipArchive/SSZipArchive.m index 1b9d073..d608e18 100755 --- a/SSZipArchive/SSZipArchive.m +++ b/SSZipArchive/SSZipArchive.m @@ -86,7 +86,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 +94,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 +118,7 @@ error:(NSError **)error delegate:(id)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]); From 4a2bc37c7a80df7d5490bcd3ba644cc86bdb4206 Mon Sep 17 00:00:00 2001 From: Joshua Hudson Date: Mon, 23 Jan 2017 10:53:39 -0800 Subject: [PATCH 5/7] Add test for #296. Check for both valid and invalid password checks. --- .../ObjectiveCExampleTests/SSZipArchiveTests.m | 17 ++++++++++++++++- ObjectiveCExample/Podfile.lock | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ObjectiveCExample/ObjectiveCExampleTests/SSZipArchiveTests.m b/ObjectiveCExample/ObjectiveCExampleTests/SSZipArchiveTests.m index 9b6b826..294099d 100644 --- a/ObjectiveCExample/ObjectiveCExampleTests/SSZipArchiveTests.m +++ b/ObjectiveCExample/ObjectiveCExampleTests/SSZipArchiveTests.m @@ -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 true."); + + BOOL fileHasInvalidValidPassword = [SSZipArchive isPasswordValidForArchiveAtPath:zipPath password:@"passw0rd123" error:&error]; + + XCTAssertFalse(fileHasInvalidValidPassword,@"Invalid password reports false."); + +} + +- (void)testFilePasswordCheck { NSString *zipPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"TestArchive" ofType:@"zip"]; BOOL protected = [SSZipArchive isFilePasswordProtectedAtPath:zipPath]; diff --git a/ObjectiveCExample/Podfile.lock b/ObjectiveCExample/Podfile.lock index c7449c8..f7483f8 100644 --- a/ObjectiveCExample/Podfile.lock +++ b/ObjectiveCExample/Podfile.lock @@ -13,4 +13,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: ae5fb993e5dc339b15e10067d1e60549fa585f32 -COCOAPODS: 1.1.0.rc.2 +COCOAPODS: 1.1.1 From d7751a54f523432a0042e0a23f26bff65e9f37c0 Mon Sep 17 00:00:00 2001 From: Joshua Hudson Date: Mon, 23 Jan 2017 11:05:24 -0800 Subject: [PATCH 6/7] Revert "Added support for getting zip file creation progress." --- SSZipArchive/SSZipArchive.h | 1 - SSZipArchive/SSZipArchive.m | 19 ++----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/SSZipArchive/SSZipArchive.h b/SSZipArchive/SSZipArchive.h index 8c77bd1..708ca16 100755 --- a/SSZipArchive/SSZipArchive.h +++ b/SSZipArchive/SSZipArchive.h @@ -61,7 +61,6 @@ 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; diff --git a/SSZipArchive/SSZipArchive.m b/SSZipArchive/SSZipArchive.m index f9a5eb9..1960b64 100755 --- a/SSZipArchive/SSZipArchive.m +++ b/SSZipArchive/SSZipArchive.m @@ -591,15 +591,6 @@ + (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(nullable NSString *)password{ - return [self createZipFileAtPath:password - 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; @@ -609,10 +600,8 @@ // 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; - for (fileName in allObjects) { + while ((fileName = [dirEnumerator nextObject])) { BOOL isDir; NSString *fullFilePath = [directoryPath stringByAppendingPathComponent:fileName]; [fileManager fileExistsAtPath:fullFilePath isDirectory:&isDir]; @@ -634,10 +623,6 @@ [zipArchive writeFileAtPath:tempFilePath withFileName:tempFileFilename withPassword:password]; } } - complete++; - if (progressHandler) { - progressHandler(complete, total); - } } success = [zipArchive close]; } @@ -900,4 +885,4 @@ return date; } -@end +@end \ No newline at end of file From 5d903ee58177d8dc3debb5a84134fea8e935b660 Mon Sep 17 00:00:00 2001 From: Joshua Hudson Date: Mon, 23 Jan 2017 11:08:36 -0800 Subject: [PATCH 7/7] Compile with latest xcode and bump podspec --- .../ObjectiveCExample.xcodeproj/project.pbxproj | 6 +++++- .../xcshareddata/xcschemes/ObjectiveCExample.xcscheme | 2 +- ObjectiveCExample/Podfile.lock | 4 ++-- SSZipArchive.podspec | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ObjectiveCExample/ObjectiveCExample.xcodeproj/project.pbxproj b/ObjectiveCExample/ObjectiveCExample.xcodeproj/project.pbxproj index 45566a6..4eab62c 100644 --- a/ObjectiveCExample/ObjectiveCExample.xcodeproj/project.pbxproj +++ b/ObjectiveCExample/ObjectiveCExample.xcodeproj/project.pbxproj @@ -265,7 +265,7 @@ 8DFE19E21BDA9FF300709011 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0710; + LastUpgradeCheck = 0820; TargetAttributes = { 8DFE19E91BDA9FF300709011 = { CreatedOnToolsVersion = 7.1; @@ -488,8 +488,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -532,8 +534,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; diff --git a/ObjectiveCExample/ObjectiveCExample.xcodeproj/xcshareddata/xcschemes/ObjectiveCExample.xcscheme b/ObjectiveCExample/ObjectiveCExample.xcodeproj/xcshareddata/xcschemes/ObjectiveCExample.xcscheme index 53d4817..bea96e0 100644 --- a/ObjectiveCExample/ObjectiveCExample.xcodeproj/xcshareddata/xcschemes/ObjectiveCExample.xcscheme +++ b/ObjectiveCExample/ObjectiveCExample.xcodeproj/xcshareddata/xcschemes/ObjectiveCExample.xcscheme @@ -1,6 +1,6 @@