feat: use xcrun simctl spawn uname to get the simulator architecture - #484
Conversation
navin772
left a comment
There was a problem hiding this comment.
What do you get when running:
xcrun simctl spawn <udid> uname -m
I get an error and everything next is blocked:
-> xcrun simctl spawn 7CA4AE45-8380-4563-AD17-C8E20506EF4B uname -m
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
The operation couldn’t be completed. No such file or directory
No such file or directory
|
It might depend on env. I switched to get it via |
There was a problem hiding this comment.
Pull request overview
This PR updates the iOS simulator preparation pipeline to choose the WebDriverAgent (WDA) simulator build based on the simulator’s architecture (instead of the host process architecture), improving compatibility in mixed environments such as Apple Silicon + Rosetta.
Changes:
- Add a helper to read the simulator architecture via
xcrun simctl .... - Update WDA resolution to accept the simulator UDID and select the
arm64vsx86_64WDA artifact accordingly. - Add Rosetta detection logging and update the call site to pass the UDID through.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async function getSimulatorArchitecture(simulatorUdid: string): Promise<string[]> { | ||
| const {stdout} = await exec('xcrun', ['simctl', 'getenv', simulatorUdid, 'SIMULATOR_ARCHS']); | ||
| const archs = stdout.trim().split(/\s+/); | ||
| return archs; | ||
| } |
| const isRosetta = await exec('sysctl', ['-in', 'sysctl.proc_translated']).then(({stdout}) => stdout.trim() === '1'); | ||
| if (isRosetta) { | ||
| log.info(`Running under Rosetta. Simulator architecture: ${archs.join(', ')}. Using ${archStr} WDA build.`); | ||
| } |
## [1.92.0](v1.91.0...v1.92.0) (2026-08-07) ### Features * use xcrun simctl spawn uname to get the simulator architecture ([#484](#484)) ([33ffb8a](33ffb8a))
|
🎉 This PR is included in version 1.92.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #483