fix(scripts): run-ios-simulator.sh exits silently when no Booted sim found

When no simulator is booted, grep -oE finds no UUID and exits 1. With
set -euo pipefail, that non-zero exit propagates through the command
substitution and kills the script at the UDID= assignment before it can
fall through to the boot-one branch.

Fix: add || true to both find_sim and sim_name pipelines so they always
return 0 regardless of whether a match was found.

Also replace sleep 2 with xcrun simctl bootstatus <UDID> -b, which blocks
until the simulator is fully booted — more reliable than a fixed delay
and faster when the simulator starts quickly.

Update docs/building.md §9 to show the bootstatus command.
This commit is contained in:
2026-06-19 02:33:14 +02:00
parent bf37fe8f0f
commit e2616b60b4
2 changed files with 11 additions and 7 deletions

View File

@@ -445,6 +445,7 @@ Under the hood the script uses `xcrun simctl` commands:
# Boot a simulator (if not already running):
xcrun simctl boot <UDID>
open -a Simulator
xcrun simctl bootstatus <UDID> -b # wait until boot is complete before installing
# Install the built .app:
xcrun simctl install <UDID> clients/apple/iOS/build/Debug-iphonesimulator/VoiceCatiOS.app