Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes for XCode 9.1 #207

Merged
merged 11 commits into from
Nov 29, 2017
Merged

Minor fixes for XCode 9.1 #207

merged 11 commits into from
Nov 29, 2017

Conversation

ob
Copy link
Member

@ob ob commented Oct 9, 2017

Mostly cosmetic and bump to iOS version

@ob ob requested a review from bayareabear October 9, 2017 18:20
@ob
Copy link
Member Author

ob commented Oct 9, 2017

Please don't merge this. This is a placeholder until Xcode 9.1 is released. Tested with Xcode 9.1-beta so far.

testHostPath = [testHostPath stringByAppendingString:appNameWithExtension];
testBundlePath = [testBundlePath stringByReplacingOccurrencesOfString:TESTROOT withString:temp];
if ([testHostPath rangeOfString:PLATFORMS].location != NSNotFound) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any handling here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually from a different PR... I'm not sure how I ended up committing it here. I'll finish it and piggyback my fix on this PR.

@oliverhu
Copy link
Member

oliverhu commented Nov 7, 2017

remember to update read.me

@zacoid55
Copy link

Don't suppose this can be merged now? I'm trying to use Bluepill but Xcode 9.1 is the problem I think :(

@ob ob mentioned this pull request Nov 16, 2017
@ob
Copy link
Member Author

ob commented Nov 16, 2017

I'm just waiting for the tests to finish on this one and I'll merge it and move what's there to the Xcode-9.0 branch.

@@ -65,13 +65,15 @@ @implementation BPApp

+ (NSArray <BPXCTestFile *>*)testsFromXCTestRunDict:(NSDictionary *)xcTestRunDict
andXCTestRunPath:(NSString *)xcTestRunPath
andXcodePath: (NSString *)xcodePath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space

withError:(NSError *__autoreleasing *)error {

NSMutableArray<BPXCTestFile *> *allTests = [[NSMutableArray alloc] init];
NSUInteger errorCount = 0;
for (NSString *key in xcTestRunDict) {
BPXCTestFile *xcTestFile = [BPXCTestFile BPXCTestFileFromDictionary:[xcTestRunDict objectForKey:key]
withTestRoot:[xcTestRunPath stringByDeletingLastPathComponent]
andXcodePath:xcodePath
andError:error];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent is wrong

@@ -98,6 +100,7 @@ + (instancetype)appWithConfig:(BPConfiguration *)config
[BPUtils printInfo:INFO withString:@"Using xctestrun configuration"];
NSArray<BPXCTestFile *> *loadedTests = [BPApp testsFromXCTestRunDict:config.xcTestRunDict
andXCTestRunPath:config.xcTestRunPath
andXcodePath:config.xcodePath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

@@ -73,7 +73,8 @@ int main(int argc, char * argv[]) {

//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
if ([[BPUtils getXcodeRuntimeVersion] isEqualToString:@XCODE_VERSION]) {
//Only compare major version Exg. 9.1 == 9.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

major and minor version (not comparing patch version)

@@ -73,7 +73,8 @@ int main(int argc, char * argv[]) {

//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
if ([[BPUtils getXcodeRuntimeVersion] isEqualToString:@XCODE_VERSION]) {
//Only compare major version Exg. 9.1 == 9.1
if ([[[BPUtils getXcodeRuntimeVersion] substringToIndex:3] isEqualToString:[@XCODE_VERSION substringToIndex:3]]) {
printf("Bluepill runtime version and compile time version are matched: %s\n", XCODE_VERSION);
} else {
fprintf(stderr, "ERROR: Bluepill runtime version %s and compile time version %s are mismatched\n", [[BPUtils getXcodeRuntimeVersion] UTF8String], XCODE_VERSION);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also update the error msg to only use substring to index 3.. otherwise people would think you need the exact patch version

Copy link
Member

@oliverhu oliverhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go!

@ob ob merged commit c330f51 into master Nov 29, 2017
@oliverhu oliverhu deleted the xcode-9.1 branch December 11, 2017 23:55
ob added a commit that referenced this pull request Mar 2, 2018
* Minor fixes for XCode 9.1

* Only check runtime major iOS version number in testRunUITest

* Bump Xcode version for circleci

* Bump runtime versions and Xcode version

* only compare major Xcode version for bluepill compile time and bluepill runtime

* Wire in the XcodePath to fix the code for replacing __PLATFORMS__

* Update README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants