Skip to content

Commit

Permalink
Updated for Xcode 8.2 (Issue #39)
Browse files Browse the repository at this point in the history
  • Loading branch information
abbeycode committed Jan 13, 2017
1 parent ffebcb4 commit 1ec14f9
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 22 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
@@ -1,10 +1,7 @@
language: objective-c
osx_image: xcode7.3
osx_image: xcode8.2

before_install:
# Fixing an issue with xctool 0.2.8 in conjunction with Xcode 7.3
- brew update
- brew uninstall --force xctool && brew install --HEAD xctool
# Used to allow pushing to CocoaPods only after all matrixed builds have succeeded
- npm install --save-dev travis-after-all

Expand All @@ -30,7 +27,6 @@ matrix:
env: NAME=ExampleAppBuild

script:
- xctool --version
# Calling via script until a bug in travis_wait is fixed: https://github.com/travis-ci/travis-ci/issues/7020
- travis_wait 15 Scripts/build.sh
- ./Scripts/carthage-validate.sh
Expand Down
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
29 changes: 22 additions & 7 deletions Tests/URKArchiveTests.m
Expand Up @@ -5,7 +5,22 @@
//

#import "URKArchiveTestCase.h"
#import <DTPerformanceSession/DTSignalFlag.h>


#import <sys/kdebug_signpost.h>
enum SignPostCode: uint { // Use to reference in Instruments (http://stackoverflow.com/a/39416673/105717)
SignPostCodeCreateTextFile = 0,
SignPostCodeArchiveData = 1,
SignPostCodeExtractData = 2,
};

enum SignPostColor: uint { // standard color scheme for signposts in Instruments
SignPostColorBlue = 0,
SignPostColorGreen = 1,
SignPostColorPurple = 2,
SignPostColorOrange = 3,
SignPostColorRed = 4,
};



Expand Down Expand Up @@ -858,15 +873,15 @@ - (void)testExtractBufferedData

- (void)testExtractBufferedData_VeryLarge
{
DTSendSignalFlag("Begin creating text file", DT_START_SIGNAL, TRUE);
kdebug_signpost_start(SignPostCodeCreateTextFile, 0, 0, 0, SignPostColorBlue);
NSURL *largeTextFile = [self randomTextFileOfLength:1000000]; // Increase for a more dramatic test
XCTAssertNotNil(largeTextFile, @"No large text file URL returned");
DTSendSignalFlag("End creating text file", DT_END_SIGNAL, TRUE);
kdebug_signpost_end(SignPostCodeCreateTextFile, 0, 0, 0, SignPostColorBlue);

DTSendSignalFlag("Begin archiving data", DT_START_SIGNAL, TRUE);
kdebug_signpost_start(SignPostCodeArchiveData, 0, 0, 0, SignPostColorGreen);
NSURL *archiveURL = [self archiveWithFiles:@[largeTextFile]];
XCTAssertNotNil(archiveURL, @"No archived large text file URL returned");
DTSendSignalFlag("Begin archiving data", DT_END_SIGNAL, TRUE);
kdebug_signpost_end(SignPostCodeArchiveData, 0, 0, 0, SignPostColorGreen);

NSURL *deflatedFileURL = [self.tempDirectory URLByAppendingPathComponent:@"DeflatedTextFile.txt"];
BOOL createSuccess = [[NSFileManager defaultManager] createFileAtPath:deflatedFileURL.path
Expand All @@ -881,7 +896,7 @@ - (void)testExtractBufferedData_VeryLarge

URKArchive *archive = [[URKArchive alloc] initWithURL:archiveURL error:nil];

DTSendSignalFlag("Begin extracting buffered data", DT_START_SIGNAL, TRUE);
kdebug_signpost_start(SignPostCodeExtractData, 0, 0, 0, SignPostColorPurple);

NSError *error = nil;
BOOL success = [archive extractBufferedDataFromFile:largeTextFile.lastPathComponent
Expand All @@ -892,7 +907,7 @@ - (void)testExtractBufferedData_VeryLarge
[deflated writeData:dataChunk];
}];

DTSendSignalFlag("End extracting buffered data", DT_END_SIGNAL, TRUE);
kdebug_signpost_end(SignPostCodeExtractData, 0, 0, 0, SignPostColorPurple);

XCTAssertTrue(success, @"Failed to read buffered data");
XCTAssertNil(error, @"Error reading buffered data");
Expand Down
52 changes: 45 additions & 7 deletions UnrarKit.xcodeproj/project.pbxproj
Expand Up @@ -1011,9 +1011,10 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0820;
TargetAttributes = {
964C8ABA18D28EE000AD7321 = {
LastSwiftMigration = 0820;
TestTargetID = 96853EDA18DB71CD00B5651B;
};
9699F9D91B3CB83100B6D373 = {
Expand Down Expand Up @@ -1293,14 +1294,31 @@
1DEB922308733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_THUMB_SUPPORT = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
OTHER_CPLUSPLUSFLAGS = (
Expand All @@ -1316,13 +1334,30 @@
1DEB922408733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_THUMB_SUPPORT = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CPLUSPLUSFLAGS = (
"-DSILENT",
Expand All @@ -1331,6 +1366,7 @@
);
OTHER_LDFLAGS = "-ObjC";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
};
name = Release;
};
Expand Down Expand Up @@ -1360,11 +1396,12 @@
"$(BUILT_PRODUCTS_DIR)/../../Headers",
);
INFOPLIST_FILE = "Tests/UnrarKit Tests-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.abbey-code.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
Expand Down Expand Up @@ -1392,11 +1429,12 @@
"$(BUILT_PRODUCTS_DIR)/../../Headers",
);
INFOPLIST_FILE = "Tests/UnrarKit Tests-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.abbey-code.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
Expand All @@ -1416,7 +1454,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
Expand Down Expand Up @@ -1463,7 +1501,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
Expand Down
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down

0 comments on commit 1ec14f9

Please sign in to comment.