This is a simple iPhone app to access the Webkit Remote Inspector running on an iOS device.
It allows you to load a URL in a UIWebView, then it enables the webkit inspector using private APIs as described here and here.
It then opens port 55555 on your iPhone or iPad and proxies the TCP connections to the internal web inspector, which wouldn't be accessible otherwise.
- Clone this project, and open it in XCode (4.3 required).
- Run it on your device
- Type the address of the page you need to debug on the device
- Open Safari (it must be Safari, other browsers won't work) and visit http://your-phone:55555.
- Alternatively, you may open the Safari Bonjour network browser, you will find the service advertised there as "Remote Webkit Inspector".
- Shake your phone to access the toolbar: from there you can go back to the recent sites list, or reload the page.
If you find a bug or have a useful improvement, send me a pull request!
All the credit goes to the people who discovered the private APIs (linked above), and to the awesome CocoaAsyncSocket library for providing an extremely convenient way of doing asynchronous networking.
I have the feeling that the remote debugging feature will soon be officially supported by Apple. At least I hope so, as it's a great feature for mobile web development.
It should be superfluous, but let's say it anyway: don't even try to submit this to the App Store, it won't be accepted as it uses private APIs.