在本机调试模式下,您可以启用调试菜单,选择“Show Inspector”> Touchables。然后 iOS 模拟器显示可触摸区域。
有没有办法通过 CLI 启用它?出于可访问性原因,我希望默认启用此功能,让工程师了解可触摸设备。
我试过:
xcrun simctl io booted setenv DEBUG_VIEWS 1
和xcrun simctl io booted execute 'defaults write com.apple.springboard ShowApplicationTouchRegions -bool YES && killall -HUP SpringBoard'
但这一直在输出
Set up a device IO operation.
Usage: simctl io <device> <operation> <arguments>