有时候测试问题的时候步骤比较复杂再模拟器上,截图跟测试说不清楚,就要用到模拟器录屏。这个功能还是比较好用的,但是很久没有用了,突然发现几个报错,记录一下。
终端: cd 到任意目录
开始:
xcrun simctl io booted recordVideo filename.mov
结束:
control + C
常见问题:
1.终端报错:
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
解决办法: PS:建议先执行第二个问题的解决命令行,很多电脑都会解决这个问题后报第二个错误,执行第二个问题的解决办法后,又报第一个问题,所以直接先执行第二个问题的解决方法再配置xcode会方便一些。
2.终端报错:
Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
解决办法:
sudo xcode-select -s /Library/Developer/CommandLineTools