【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
###假定场景
我想快速访问模拟器,
我不想用xcode重复运行,安装app
我想把ipa包直接分发出去,让别人快速通过命令行安装
问题得到了解决,go-swift.net
###查看模拟器的日志目录
cd ~/Library/Logs/gym
cd ~/Library/Logs/DiagnosticReports/
###模拟器目录
print("💡 Simulator directory is : \(NSTemporaryDirectory())")
~/Library/Developer/CoreSimulator/Devices/<模拟器设备id>/data/Containers/Containers/Data/Application/<应用id>/tmp
###解决方案
//获取帮助
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
引用链接:点击
###获取帮助
创新源于一种感觉! http://go-swift.net
来源:oschina
链接:https://my.oschina.net/u/819364/blog/633637