How to set iOS Simulator Language when launching via simctl

南楼画角 提交于 2019-12-06 15:51:21

Just figured this out myself:

xcrun simctl launch <deviceid> <appid> -AppleLanguages "(en-GB)"

or

xcrun simctl launch <deviceid> <appid> -AppleLanguages \(en-GB\)

When you use the -AppleLanguages as a launch argument in the scheme, it expects the parentheses around the language identifier. On the command line, bash wants to interpret them, so you either need to escape them or put the language in quotes.

Just replace en-GB with the language you want to use.

As a bootnote, when you run [NSLocale preferredLanguages] it will report the specified language.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!