I need to lauch iOS Simulator that uses specific language using command line. So I found that I can use
instruments -w <device>
and it is working great, I can set specific device. But how can I run simulator with specific language? I've tried adding
-AppleLanguages -AppleLocale
but there are some warnings:
Instruments Usage Error : Specified target process is invalid: -AppleLanguage
thanks!
On the simulator, open the Settings app. Navigate to General > Language & Region > iPhone Language to select a new language.
Just type this command in Terminal: open -a Simulator. app to launch the most recent simulator. Type this command in Terminal to run the Simulator rigth from the its folder.
Use the emulator command to start the emulator, as an alternative to running your project or starting it through the AVD Manager. Here's the basic command-line syntax for starting a virtual device from a terminal prompt: emulator -avd avd_name [ {- option [ value ]} … ]
in iOS Simulator menu, go to Features -> Location -> Custom Location. There you can set the latitude and longitude and test the app accordingly. This works with mapkit and also with CLLocationManager.
The only way to launch iOS Simulator
with specific language is to change contents of its .GlobalPreferences.plist
file. Using xcrun
tool will not work because it passess arguments to launched app and not changing language of simulator itself. Manipulation on .GlobalPreferences.plist
is quite difficult because it is a binary plist
file, so you cannot modify it as 'normal' xml
. The easiest way to change its contents is to write simple Xcode Command Line Tool application
, Foundation SDK
has all tools needed to modify binary plists
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With