调试iOS H5 项目的另一种选择-ios-webkit-debug-proxy

查看:ios-webkit-debug-proxy的github地址

调试iOS设备的webView都只能使用Safari web inspector

(为什么只有测试包才能查看到webview的内容?)

Chrome的DevTool也可以调试ios设备

安装

brew install ios-webkit-debug-proxy

安装代理

链接好usb

启动

ios_webkit_debug_proxy -f chrome-devtools://devtools/bundled/inspector.html

报错:Could not connect to lockdownd. Exiting.: Permission denied

解决方法:

1、sudo chmod +x /var/db/lockdown

给 chmod + 添加某个权限 x 可执行 /var/db/lockdown

2、brew upgrade libimobiledevice --HEAD

1/2都可以解决permission denied

重新启动

报错

Could not connect to lockdownd. Exiting.: Operation now in progress

Unable to attach 114f6f433652e36bd882d05a66f55e5a74e6f396 inspector

emmm ……

Could not connect to lockdownd (or doesn't work with iOS10+)

Could not connect to lockdownd. Exiting.: No such file or directory. Unable to attach inspector ios_webkit_debug_proxy

Check the device for a prompt to trust the connected computer. Choose "Trust" and try again.

查看一下是否信任,选择信任

Could not connect to lockdownd. Exiting.: Broken pipe. Unable to attach inspector

Please upgrade libimobiledevice to version from master and rebuild ios-webkit-debug-proxy. Upcoming 1.2.1 has many fixes but not marked for release just yet. If you're on OS X:

把ibimobiledevice 的版本升级到主要版本

重构 ios-webkit-debug-proxy.

brew update

brew reinstall --HEAD libimobiledevice

brew reinstall -s ios-webkit-debug-proxy

你可能感兴趣的:(调试iOS H5 项目的另一种选择-ios-webkit-debug-proxy)