Skip to content

Commit

Permalink
Fix running on simulators regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
lebedev committed Apr 5, 2018
1 parent 2de3c42 commit 1963d85
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions local-cli/runIOS/runIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,12 @@ function runOnSimulator(xcodeProject, args, scheme) {

if (!selectedSimulator.booted) {
const simulatorFullName = formattedDeviceName(selectedSimulator);
console.log(`Booting ${simulatorFullName}...`);
console.log(`Launching ${simulatorFullName}...`);
try {
child_process.execFileSync('xcrun', ['simctl', 'boot', selectedSimulator.udid]);
child_process.spawnSync('xcrun', ['instruments', '-w', selectedSimulator.udid]);
} catch (e) {
throw new Error(
`Could not boot ${args.simulator} simulator. Is there already a simulator running?
Running multiple simulators is only supported from Xcode 9 and up.
Try closing the simulator or run the command again without specifying a simulator.`
);
// instruments always fail with 255 because it expects more arguments,
// but we want it to only launch the simulator
}
}

Expand Down

0 comments on commit 1963d85

Please sign in to comment.