Improve iOS simulator boot and app install reliability#314
Merged
gabrieldonadel merged 3 commits intomainfrom Mar 13, 2026
Merged
Improve iOS simulator boot and app install reliability#314gabrieldonadel merged 3 commits intomainfrom
gabrieldonadel merged 3 commits intomainfrom
Conversation
The simulator can be in a Shutdown or transitional state when Orbit
tries to install an app, causing "Unable to lookup in current state:
Shutdown" errors (CoreSimulator.SimError code 405).
Changes:
- ensureSimulatorBootedAsync now polls until simulator reports Booted
after issuing `simctl boot`, with a 60s timeout
- Handle race condition where simulator gets booted by another process
("Unable to boot device in current state: Booted")
- installAppAsync retries up to 3 times on transient simulator state
errors with 2s delay between attempts
- CLI's installAndLaunchIOSAppAsync now boots the simulator before
attempting install (was previously missing)
- Add SIMULATOR_NOT_READY error code for clearer error identification
https://claude.ai/code/session_016zo1GKjHDxWfKCmJ7uoB1X
f43b804 to
c85c7a2
Compare
76fec00 to
ca50f4a
Compare
alanjhughes
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enhances the reliability of iOS simulator operations by adding retry logic for app installation. It addresses issues where simulators may not be immediately ready after booting or may be in transitional states during installation.
Key Changes
simctlInstallWithRetryAsync()with configurable retry attempts (3 by default) and delays to handle transient simulator statesSIMULATOR_NOT_READYerror code for better error categorizationImplementation Details