简体   繁体   English

如何在无头模式或无窗口模式下启动模拟器

[英]How to boot simulator in headless mode or without window

In android there is a command to boot up a sim without a head or window which takes up significantly less ram eg在android中,有一个命令可以启动一个没有头部或窗口的sim,它占用的内存要少得多,例如

emulator -avd Pixel2Four_API_27 -no-window -no-audio -no-snapshot-load

Is there such a mode for iOS sims? iOS sims 有这样的模式吗?

Thanks谢谢

To launch a simulator in headless mode, for example an iPhone 11 :要以无头模式启动模拟器,例如 iPhone 11:

xcrun simctl boot iPhone\ 11

If you want the list of all simulator available, use this command :如果您想要所有可用模拟器的列表,请使用以下命令:

instruments -s devices

At any moment, you can see the UI of your simulator by launching the simulator app :在任何时候,您都可以通过启动模拟器应用程序来查看模拟器的 UI:

open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM