diff --git a/local-cli/runIOS/runIOS.js b/local-cli/runIOS/runIOS.js index 8927be98d80226..1cbcc4108db727 100644 --- a/local-cli/runIOS/runIOS.js +++ b/local-cli/runIOS/runIOS.js @@ -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 } }