()
| 942 | } |
| 943 | |
| 944 | function findBootedSimulatorUDID() { |
| 945 | const data = JSON.parse( |
| 946 | runText("xcrun", ["simctl", "list", "devices", "booted", "-j"]), |
| 947 | ); |
| 948 | for (const runtimes of Object.values(data.devices ?? {})) { |
| 949 | for (const device of runtimes) { |
| 950 | if (device.state === "Booted") { |
| 951 | return device.udid; |
| 952 | } |
| 953 | } |
| 954 | } |
| 955 | return ""; |
| 956 | } |
| 957 | |
| 958 | function extractPreviews(source) { |
| 959 | const previews = []; |