ios_webkit_debug_proxy 介紹
ios_webkit_debug_proxy 是一個從usb到websocket的代理。允許開發者實時的向手機端safari和UIWebViews發送命令。
安裝scoop
在powershell中運行Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
使用scoop安裝ios-webkit-debug-proxy
scoop bucket add extras
scoop install ios-webkit-debug-proxy
安裝remotedebug-ios-webkit-adapter
- 在使用適配器軟件時,你需要安裝最新版本的iTunes,因為這個軟件需要使用使用某些與IOS通信的驅動。
- 使用npm安裝軟件
npm install remotedebug-ios-webkit-adapter -g
- 在iPhone中啟用遠程調試。打開iOS 設置 => Safari 設置 => 打開 "Web Inspector"
- 使iPhone信任電腦
- 運行命令
remotedebug_ios_webkit_adapter --port=9000
BTW: ios-webkit-debug-proxy will be run automatically for you, no need to start it separately. - 使用chrome打開
chrome://inspect
,可以在頁面中添加9000端口