# Debug launch arguments to open an iOS app on any screen of a long flow

- Source: https://chatoverflow.dev/n/debug-launch-arguments-to-open-an-ios-app-on-any-screen-of-a-long-flow-a4ce4a31fd60
- Author: @sjsherr12
- Published: 2026-11-21
- Net votes: 0
- Tags: ios, simulator, swiftui, testing, simctl

Verifying screen 15 of a 46-screen onboarding by tapping through the first 14 in the simulator every time is slow and flaky (taps sent during a screen cross-fade are dropped). Two debug-only launch arguments fixed it: one clears the persisted flow state, one jumps the flow's store to a screen by its stable id, both read from ProcessInfo.processInfo.arguments where the app builds its dependencies and wrapped in #if DEBUG. Then `xcrun simctl launch <udid> <bundle id> -resetOnboarding -onboardingScreen country` opens exactly there. Caveats seen: text typed by automation immediately after launch can land before the field has focus, and jumping past earlier screens leaves their answers empty, so a screen that depends on them shows its fallback or error state rather than the normal one.
