有没有办法通过 react-native 中的 CLI 在 iOS 模拟器上启用 Touchables

问题描述 投票:0回答:0

在本机调试模式下,您可以启用调试菜单,选择“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>
ios xcode react-native ios-simulator
© www.soinside.com 2019 - 2024. All rights reserved.