Skip to content

Commit

Permalink
Merge pull request facebookarchive#767 from qyang-nj/xcode-11-fix
Browse files Browse the repository at this point in the history
Add `--standalone` option when spawning simulator in Xcode 10 and 11.
  • Loading branch information
ExtremeMan authored Sep 16, 2019
2 parents 60b63dc + cb31561 commit 95460fe
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions xctool/xctool/SimulatorWrapper/SimulatorTaskUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@

if ([sdkName hasPrefix:@"iphonesimulator"] ||
[sdkName hasPrefix:@"appletvsimulator"]) {
[taskArgs addObjectsFromArray:@[
@"spawn",
[[[simulatorInfo simulatedDevice] UDID] UUIDString],
]];
SimDevice *simulatedDevice = [simulatorInfo simulatedDevice];
[taskArgs addObject: @"spawn"];
if (ToolchainIsXcode10OrBetter() && [simulatedDevice state] != SimDeviceStateBooted) {
// If simulator is not booted, pass --standalone option, which is required by Xcode 11.
[taskArgs addObject: @"--standalone"];
}
[taskArgs addObject: [[simulatedDevice UDID] UUIDString]];
[taskArgs addObject:launchPath];
[taskArgs addObjectsFromArray:arguments];

Expand Down

0 comments on commit 95460fe

Please sign in to comment.