Skip to content

fix(ios): skip simulator fallback for physical device UDIDs - #2829

Open
huytdps13400 wants to merge 1 commit into
react-native-community:mainfrom
huytdps13400:fix/2826-lazy-simulator-fallback
Open

fix(ios): skip simulator fallback for physical device UDIDs#2829
huytdps13400 wants to merge 1 commit into
react-native-community:mainfrom
huytdps13400:fix/2826-lazy-simulator-fallback

Conversation

@huytdps13400

Copy link
Copy Markdown

Summary

  • resolve the fallback simulator only inside branches that actually launch a simulator
  • let run-ios --udid <physical-device> reach runOnDevice without requiring any installed or matching simulator
  • preserve the existing no-flag, explicit simulator, tvOS, and non-iOS fallback behavior

Fixes #2826

Test Plan

  • RED: yarn test packages/cli-platform-apple/src/commands/runCommand/__tests__/createRun.test.ts --runInBand failed before the fix because the mocked simulator lookup threw before the physical-device branch ran
  • yarn test packages/cli-platform-apple/src/commands/runCommand/__tests__/createRun.test.ts --runInBand (5 passed)
  • yarn test packages/cli-platform-apple --runInBand (8 suites, 40 passed)
  • yarn test:ci:unit (55 suites, 314 passed, 1 pre-existing todo)
  • yarn lint (0 errors; 2 pre-existing warnings outside this diff)
  • yarn build
  • git diff --check
  • yarn test:ci:e2e under Node 22: 3 suites and 21 tests passed; the remaining unrelated fixtures failed because the current config snapshot omits the existing spm [action] command, the local Android fixture has no ANDROID_HOME, and Yarn could not register the __e2e__ link package

Checklist

  • Documentation is up to date; this restores the documented --udid physical-device path without changing CLI options.
  • Follows commit message convention described in CONTRIBUTING.md.
  • For functional changes, my test plan has linked these CLI changes into a local react-native checkout. The device-selection regression is covered directly at the createRun boundary instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run-ios --udid <physical device> throws "No simulator available" because the fallback simulator is resolved eagerly

1 participant