Skip to content

Commit

Permalink
Minor fixes for XCode 9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ob committed Dec 5, 2017
1 parent c330f51 commit 46a0866
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Bluepill-runner/Bluepill-runner/BPApp.m
Expand Up @@ -137,7 +137,7 @@ + (instancetype)appWithConfig:(BPConfiguration *)config
[allTests addObject:testFile];
}
}

app.testBundles = allTests;
return app;
}
Expand Down
8 changes: 4 additions & 4 deletions Bluepill-runner/Bluepill-runner/main.m
Expand Up @@ -63,14 +63,14 @@ int main(int argc, char * argv[]) {
printf("Bluepill %s\n", BP_VERSION);
exit(0);
}

// Check if xcode version running on the host match the intended Bluepill branch: Xcode 9 branch is not backward compatible
NSString *xcodeVersion = [BPUtils runShell:@"xcodebuild -version"];
if ([xcodeVersion rangeOfString:@BP_DEFAULT_XCODE_VERSION].location == NSNotFound) {
fprintf(stderr, "ERROR: Invalid Xcode version:\n%s;\nOnly %s is supported\n", [xcodeVersion UTF8String], BP_DEFAULT_XCODE_VERSION);
exit(1);
}

// Check if Bluepill compile time Xcode version is matched with Bluepill runtime Xcode version
// Senario to prevent: Bluepill is compiled with Xcode 8, but runs with host installed with Xcode 9
// Only compare major and minor version version Exg. 9.1 == 9.1
Expand All @@ -85,7 +85,7 @@ int main(int argc, char * argv[]) {
m();
exit(0);
}

while((c = getopt_long(argc, argv, sopts, lopts, NULL)) != -1) {
if (!optarg) optarg = "";
[config saveOpt:[NSNumber numberWithInt:c] withArg:[NSString stringWithUTF8String:optarg]];
Expand All @@ -109,7 +109,7 @@ int main(int argc, char * argv[]) {
[app listTests];
exit(0);
}

BPConfiguration *normalizedConfig = [BPUtils normalizeConfiguration:config withTestFiles:app.testBundles];
// start a runner and let it fly
BPRunner *runner = [BPRunner BPRunnerWithConfig:normalizedConfig withBpPath:nil];
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -98,10 +98,11 @@ A full list supported options are listed here.

## Requirements

Bluepill only works with **Xcode 9.1**. If you're looking for old Xcode support, please check out the other branches:
Bluepill only works with **Xcode 9.2**. If you're looking for old Xcode support, please check out the other branches:

* [Xcode-8](https://github.com/linkedin/bluepill/tree/xcode8)
* [Xcode-9.0](https://github.com/linkedin/bluepill/tree/xcode-9.0)
* [Xcode-9.1](https://github.com/linkedin/bluepill/tree/xcode-9.1)

## Acknowledgement

Expand Down
4 changes: 2 additions & 2 deletions Source/Shared/BPConstants.h
Expand Up @@ -9,9 +9,9 @@

#import <Foundation/Foundation.h>

#define BP_DEFAULT_RUNTIME "iOS 11.1"
#define BP_DEFAULT_RUNTIME "iOS 11.2"
#define BP_DEFAULT_DEVICE_TYPE "iPhone 7"
#define BP_DEFAULT_XCODE_VERSION "Xcode 9.1"
#define BP_DEFAULT_XCODE_VERSION "Xcode 9.2"
#define BP_TM_PROTOCOL_VERSION 17
#define BP_DAEMON_PROTOCOL_VERSION 24

Expand Down
2 changes: 1 addition & 1 deletion circle.yml
@@ -1,6 +1,6 @@
machine:
xcode:
version: 9.1
version: 9.2

compile:
override:
Expand Down
1 change: 0 additions & 1 deletion scripts/bluepill.sh
Expand Up @@ -85,7 +85,6 @@ bluepill_build_sample_app()
-workspace Bluepill.xcworkspace \
-scheme BPSampleApp \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 7,OS=11.1' \
-derivedDataPath "build/" 2>&1 | tee result.txt | $XCPRETTY

test $? == 0 || {
Expand Down

0 comments on commit 46a0866

Please sign in to comment.