@@ -64,6 +64,34 @@ elif best:
6464 xcrun simctl bootstatus " $DEVICE_ID " -b || echo " Simulator booted"
6565}
6666
67+ # Cut UIKit animation time, mirroring `disable-animations: true` on the Android emulator
68+ # (NativePipeline.yml) — iOS previously had no equivalent, so every navigation push/modal
69+ # played at full length on a 3-vCPU runner while Android's ran instantly.
70+ #
71+ # Scope: this shortens SYSTEM transitions (nav pushes, modal presents, alerts). React
72+ # Native's `Animated` does NOT read this flag automatically, so widget-internal animations
73+ # (carousel, animation-native) are unaffected — this is not a substitute for the per-flow
74+ # waits those need.
75+ #
76+ # Requires a BOOTED device (`simctl spawn`), so call after start_simulator. The value is
77+ # written to the device's persistent domain and survives shutdown/boot, so a
78+ # restart_simulator in helpers.sh keeps it.
79+ reduce_motion () {
80+ echo " Reducing motion on iOS Simulator..."
81+ if [ -z " $SIMULATOR_DEVICE_ID " ]; then
82+ echo " Error: SIMULATOR_DEVICE_ID not set"
83+ return 1
84+ fi
85+ # Best-effort: a future runtime that drops/renames these keys should not fail the shard,
86+ # since tests still pass with animations on (just slower).
87+ xcrun simctl spawn " $SIMULATOR_DEVICE_ID " defaults write com.apple.Accessibility ReduceMotionEnabled -bool true \
88+ || echo " ::warning::Could not set ReduceMotionEnabled; animations stay at full length"
89+ # Replaces the sliding push/pop transition with a cross-fade — the slide is what Maestro
90+ # most often races against when asserting right after a navigation tap.
91+ xcrun simctl spawn " $SIMULATOR_DEVICE_ID " defaults write com.apple.Accessibility ReduceMotionReduceSlideTransitionsEnabled -bool true \
92+ || echo " ::warning::Could not set ReduceMotionReduceSlideTransitionsEnabled"
93+ }
94+
6795set_status_bar () {
6896 echo " Setting status bar on iOS Simulator..."
6997 if [ -z " $SIMULATOR_DEVICE_ID " ]; then
@@ -92,6 +120,7 @@ verify_installed_app() {
92120}
93121
94122start_simulator
123+ reduce_motion
95124set_status_bar
96125install_ios_app
97126verify_installed_app
0 commit comments