【卡片记忆】快速启动iOS模拟器

###假定场景ios

我想快速访问模拟器,
我不想用xcode重复运行,安装app
我想把ipa包直接分发出去,让别人快速经过命令行安装


问题获得了解决,go-swift.net

###查看模拟器的日志目录swift

cd ~/Library/Logs/gym

cd ~/Library/Logs/DiagnosticReports/

###模拟器目录xcode

print("💡 Simulator directory is : \(NSTemporaryDirectory())")

~/Library/Developer/CoreSimulator/Devices/<模拟器设备id>/data/Containers/Containers/Data/Application/<应用id>/tmp

###解决方案app

//获取帮助
xcrun simctl help

//查看当前设备的模拟器列表
xcrun simctl list

//安装到模拟器

xcrun simctl install booted xxx.app

//启动模拟器
xcrun instruments -w "iPhone 6 (8.3 Simulator)"

//启动某一应用
xcrun simctl install "iPhone 6" com.cn.goswift //com.cn.goswift是bundle id

//卸载应用

xcrun simctl uninstall "iPhone 6" com.cn.goswift //com.cn.goswift是bundle id

启动apple watch
xcrun simctl launch "iPhone 6" com.goswift.watchkitapp 

//使用模拟器代开网页 不用手动输入

xcrun simctl openurl booted http://www.go-swift.net

//录制模拟器视频
xcrun simctl io booted recordVideo <filename>.<extension>

//模拟器截屏
xcrun simctl io booted screenshot

引用连接:点击ide

###获取帮助url

创新源于一种感受! http://go-swift.net.net

二维码

相关文章
相关标签/搜索