veilid/scripts/new_ios_sim.sh
2023-05-29 19:24:57 +00:00

10 lines
377 B
Bash
Executable File

#!/bin/bash
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)
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