()
| 120 | } |
| 121 | |
| 122 | export async function queryFirstBootedSimulatorAsync(): Promise<SimulatorUdid | null> { |
| 123 | const { stdout } = await spawnAsync('xcrun', [ |
| 124 | 'simctl', |
| 125 | 'list', |
| 126 | 'devices', |
| 127 | 'iPhone', |
| 128 | 'booted', |
| 129 | '--json', |
| 130 | ]); |
| 131 | const { devices: devicesWithRuntimes } = JSON.parse(stdout); |
| 132 | |
| 133 | for (const devices of Object.values<{ udid: string }[]>(devicesWithRuntimes)) { |
| 134 | if (devices.length > 0) { |
| 135 | return devices[0].udid; |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | return null; |
| 140 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…