I'm creating a CI flow that uses appium and iOs simulator in macos-latest. My app will change language along with simulator language. I found that edit .GlobalPreferences.plist file and then boot the simulator will change to Japanese but the simulator still get default language (en)
Nodejs : 16
Java: 11
Appium: 1.22.3
MacOs: latest
iOs Runtime: 12.4
Device: IphoneX - Simulator
xcrun simctl create TestiPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-12-4 > deviceid.txt
DEVICEUUID=`cat deviceid.txt`
echo $DEVICEUUID
plutil -p ~/Library/Developer/CoreSimulator/Devices/$DEVICEUUID/data/Library/Preferences/.GlobalPreferences.plist
plutil -replace AppleLocale -string "ja_US" ~/Library/Developer/CoreSimulator/Devices/$DEVICEUUID/data/Library/Preferences/.GlobalPreferences.plist
plutil -replace AppleLanguages -json "[ \"ja\" ]" ~/Library/Developer/CoreSimulator/Devices/$DEVICEUUID/data/Library/Preferences/.GlobalPreferences.plist
echo "Verify locale and language ~ JP"
plutil -p ~/Library/Developer/CoreSimulator/Devices/$DEVICEUUID/data/Library/Preferences/.GlobalPreferences.plist
xcrun simctl boot $DEVICEUUID
xcrun simctl bootstatus $DEVICEUUID
xcrun simctl install booted /Users/runner/work/appiumclonetest/appiumclonetest/BuildFiles/mobile.app
When I use iOS 15.0, .GlobalPreferences.plist file does not exist in
~/Library/Developer/CoreSimulator/Devices/$DEVICEUUID/data/Library/Preferences
Where can I found it ?
Can I change simulator language by edit .GlobalPreferences.plist file or do I need to change other things to make it work? I also search for similar discussions but no luck. Thanks