Skip to content

Instantly share code, notes, and snippets.

@clarmso
Created August 20, 2025 01:43
Show Gist options
  • Save clarmso/90d2fb17c7a886b02b8aa73da1001cdf to your computer and use it in GitHub Desktop.
Save clarmso/90d2fb17c7a886b02b8aa73da1001cdf to your computer and use it in GitHub Desktop.
Set all iOS simulators to US locale
#!/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