Created
August 20, 2025 01:43
-
-
Save clarmso/90d2fb17c7a886b02b8aa73da1001cdf to your computer and use it in GitHub Desktop.
Set all iOS simulators to US locale
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| # Get all simulator UDIDs | |
| SIM_UDIDS=$(xcrun simctl list devices | grep -Eo '[A-F0-9-]{36}') | |
| for UDID in $SIM_UDIDS; do | |
| echo "Setting locale for simulator $UDID ..." | |
| # Boot the simulator if not already booted | |
| xcrun simctl bootstatus "$UDID" -b || true | |
| # Set locale and language | |
| xcrun simctl spawn "$UDID" defaults write -g AppleLocale en_US | |
| xcrun simctl spawn "$UDID" defaults write -g AppleLanguages -array en-US | |
| # Optional: shutdown the simulator after setting | |
| xcrun simctl shutdown "$UDID" | |
| done | |
| echo "Locale set to en-US for all simulators." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment