我正在使用的模拟器实例有时会在持续集成运行后保留在inconsistent state中,如何重置它?
重置在构建服务器上的普通用户帐户中运行的模拟器似乎不会重置Bots使用的模拟器(在受限制的_xcsbuild
用户下运行。)
答案 0 :(得分:2)
受this gist的启发,将此脚本作为Bot上的“Before Integration”触发器运行:
/usr/bin/osascript -e 'tell application "iOS Simulator" to quit'
/usr/bin/osascript -e 'tell application "Simulator" to quit'
/usr/bin/xcrun simctl erase all
...和重复雷达24091918将“all”添加为xcrun simctl shutdown
的有效参数。