veilid/scripts/new_ios_sim.sh

10 lines
377 B
Bash
Raw Normal View History

2022-11-29 12:16:28 -05:00
#!/bin/bash
2023-05-29 15:24:57 -04:00
RUNTIME=$(xcrun simctl runtime list -j | jq '.[].runtimeIdentifier' -r | head -1)
ID=$(xcrun simctl create test-iphone com.apple.CoreSimulator.SimDeviceType.iPhone-14-Pro $RUNTIME 2>/dev/null)
2022-11-29 12:16:28 -05:00
xcrun simctl boot $ID
xcrun simctl bootstatus $ID
echo Simulator ID is $ID
( trap exit SIGINT ; read -r -d '' _ </dev/tty ) ## wait for Ctrl-C
xcrun simctl delete $ID