How to launch iOS Simulator in specific language from command line?

后端 未结 3 1392
自闭症患者
自闭症患者 2020-12-19 07:54

I need to lauch iOS Simulator that uses specific language using command line. So I found that I can use

instruments -w 

and i

3条回答
  •  时光取名叫无心
    2020-12-19 08:37

    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.

提交回复
热议问题