fix(ios): ensure Simulator window is always visible after boot

Fixed build script to always open Simulator app window:

Simulator Visibility:
- Always opens Simulator app window after booting
- Ensures window is visible even if simulator was already booted
- Provides visual feedback that simulator is running

Boot Flow:
- If already booted: opens Simulator window immediately
- If booting: boots device, then opens Simulator window
- If boot fails: opens Simulator app for manual selection

Fixes:
- Simulator window now always appears after build
- User can see simulator even if it was already running
- Better visual feedback during build process

Result: Simulator window is now always visible after build completes
This commit is contained in:
Matthew Raymer
2025-11-11 20:02:06 -08:00
parent ceb81a6be1
commit 9d6d979d83

View File

@@ -103,12 +103,18 @@ if [ "$SIMULATOR_DEVICE" != "Any iOS Simulator Device" ] && [ "$SIMULATOR_DEVICE
if [ -n "$BOOTED" ]; then
log_info "✓ Simulator already booted: $SIMULATOR_DEVICE"
# Ensure Simulator window is visible
log_info "Opening Simulator app window..."
open -a Simulator
else
log_info "Booting $SIMULATOR_DEVICE..."
# Try to boot by device name first
if xcrun simctl boot "$SIMULATOR_DEVICE" 2>&1; then
log_info "✓ Simulator booted successfully"
# Wait a moment for simulator to fully initialize
# Open Simulator app window so user can see it
log_info "Opening Simulator app window..."
open -a Simulator
# Wait a moment for simulator to fully initialize and window to appear
sleep 3
else
log_warn "Could not boot simulator automatically"