杂记-01.xcode模拟器管理

345 阅读1分钟

xcode模拟器

一、Xcode允许我们使用xcrun命令运行模拟器

1、列出你安装的所有可用的设备

xcrun instruments -s

2、开启指定模拟器(上面的列表就是可用模拟器名称)

xcrun instruments -w "iPhone 8 (11.2)"

二、使用的Xcode的simctl命令来控制模拟器

1、安装指定的app

xcrun simctl install booted <app路径>

2、运行指定的app (com.example.app)

xcrun simctl launch booted <app identifier>

3、卸载指定的应用

xcrun simctl uninstall booted <app identifier>

讨论地址: 记录学习中遇到的问题,记录成长