Skip to content

[build-tools] Enable simulator accessibility prefs before boot#3914

Merged
sjchmiela merged 1 commit into
mainfrom
stanley/simulator-boot-improv
Jun 30, 2026
Merged

[build-tools] Enable simulator accessibility prefs before boot#3914
sjchmiela merged 1 commit into
mainfrom
stanley/simulator-boot-improv

Conversation

@sjchmiela

@sjchmiela sjchmiela commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an opt-in enable_accessibility_settings boolean input to eas/start_ios_simulator.
  • When enabled, call IosSimulatorUtils.enableAccessibilitySettingsAsync inline immediately before each IosSimulatorUtils.startAsync call, including cloned simulators.
  • Reuse the existing xcrun simctl list devices --json --no-escape-slashes available wrapper so the dataPath from simctl JSON is used directly, then do an exact UDID/name equality check in JS. This avoids simctl search-term substring matches like iPhone 17 matching iPhone 17 Pro.
  • Treat invalid requested simulator state as UserError; wrap command/filesystem setup failures as SystemError.

Why

These accessibility preferences help Argent and other AX-tree based tools inspect Simulator state more reliably. They can influence app/runtime accessibility behavior, so the setting is explicit and default-off rather than applied to every simulator startup.

Maestro compatibility

enable_accessibility_settings defaults to false, so existing Maestro test runs and other eas/start_ios_simulator users keep the previous startup behavior unless they opt in. When enabled, the setup only writes preferences for an exact, available, shutdown simulator before simctl bootstatus -b. If the requested simulator is not available or not shutdown, the step fails with UserError; if the setup command/filesystem work fails, it fails with SystemError.

Notes

  • plutil is a standard macOS utility (/usr/bin/plutil on the local validation machine), so this does not add an external tool installation requirement.

Validation

CI should pass.

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 59.12%. Comparing base (85a4054) to head (207f922).

Files with missing lines Patch % Lines
...ackages/build-tools/src/utils/IosSimulatorUtils.ts 95.84% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3914      +/-   ##
==========================================
+ Coverage   59.05%   59.12%   +0.07%     
==========================================
  Files         935      935              
  Lines       40954    40983      +29     
  Branches     8621     8629       +8     
==========================================
+ Hits        24181    24226      +45     
+ Misses      16678    16662      -16     
  Partials       95       95              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sjchmiela sjchmiela force-pushed the stanley/simulator-boot-improv branch 7 times, most recently from a2aa55a to 7942a3b Compare June 29, 2026 15:21
@sjchmiela sjchmiela force-pushed the stanley/simulator-boot-improv branch from 7942a3b to 207f922 Compare June 29, 2026 15:25
@sjchmiela sjchmiela added the no changelog PR that doesn't require a changelog entry label Jun 29, 2026
@github-actions

Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

@sjchmiela sjchmiela changed the title Enable simulator accessibility prefs before boot [build-tools] Enable simulator accessibility prefs before boot Jun 29, 2026
@sjchmiela sjchmiela marked this pull request as ready for review June 29, 2026 15:30
@sjchmiela sjchmiela requested a review from gwdp June 29, 2026 15:30
@github-actions

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

@gwdp gwdp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@sjchmiela sjchmiela merged commit 785d690 into main Jun 30, 2026
11 of 12 checks passed
@sjchmiela sjchmiela deleted the stanley/simulator-boot-improv branch June 30, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants