bootSimulator function

String? bootSimulator(
  1. String uid, {
  2. bool? headless = true,
  3. String simulatorAppPath = '/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/',
})

Boots the simulator from the given uid

Implementation

String? bootSimulator(String uid,
    {bool? headless = true,
    String simulatorAppPath =
        '/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/'}) {
  var boot = run('xcrun', ['simctl', 'boot', uid]);
  while (!_isSimulatorBooted(uid)) {
    continue;
  }
  if (headless!) {
    return boot;
  }
  return run('open', [simulatorAppPath]);
}