genkio / blog

Stay hungry stay foolish
https://slashbit.github.io/blog/
0 stars 1 forks source link

How to connect iOS simulator to Chrome for debugging hybrid (cordova) iOS app #64

Open genkio opened 8 years ago

genkio commented 8 years ago

Step 1. install homebrew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Step 2. brew install ios-webkit-debug-proxy

$ brew install ios-webkit-debug-proxy

Step 3. build and launch the cordova app in the iOS simulator

Step 4. start ios_webkit_debug_proxy in the command line

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

Step 5. launch Chrome and go to http://localhost:9222/

Step 6. copy the url presented on http://localhost:9222/ (file:///Users/...xxx.app/www/index.html) then paste it in a new tab and hit enter, that's it!