Snippets, Web Development

How to use iPad’s web inspector on Ubuntu 14.04

How to use iPad’s web inspector on Ubuntu

I’ve heard about remote debugging on iPad for quite a while and I used it on windows too; however it’s not so easy to have a similar system on Ubuntu. Hopefully this post will spare you an hour of time while to enable Chrome’s dev tool on your iPad.

This has been tested on xUbuntu 14.04 – but it should work as well on any Debian based OS.

Installation

1) Install dependecies:

1
2
3
4
5
6
 sudo apt-get install \
 autoconf automake \
 libusb-dev libusb-1.0-0-dev \
 libplist-dev libplist++-dev \
 usbmuxd \
 libimobiledevice-dev

Using the default instructions leads to the following message error when trying to start the proxy:

1
Detected an old copy of libplist?! For a fix, see: https://github.com/libimobiledevice/libimobiledevice/issues/68#issuecomment-38994545: Success Unable to start device_listener

Note: previously listed libplist-dev or libplist++-dev are useless, but I do not know which one: if you can tell which one is useless, let me know so I’ll fix the tutorial!

2) download libimobiledevice, since the ones in the Ubuntu repository are outdated; You need the 1.11 series, not the 1.10:

1
2
3
4
5
6
wget http://www.libimobiledevice.org/downloads/libplist-1.11.tar.bz2
tar -xvf libplist-1.11.tar.bz2
cd libplist-1.11/
mkdir ~/ios-proxy
./configure --prefix=/<Your home folder>/ios-proxy/
make && make install

3) Install ios webkit debug proxy using the freshly installed library:

1
2
3
4
5
cd ~
git clone https://github.com/google/ios-webkit-debug-proxy.git
cd ios-webkit-debug-proxy
./autogen.sh
LDFLAGS="-L/<Your home folder>/ios-proxy/lib/" CFLAGS="-I/<Your home folder>/ios-proxy/include/" ./configure --prefix=/<Your home folder>/ios-proxy make  make install

Unfortunately, you still need to call the inspector this way:

1
LD_PRELOAD=/<Your home folder>/ios-proxy/lib/libplist.so /<Your home folder>/ios-proxy/bin/ios_webkit_debug_proxy

4) Launch your browser (chromium works fine) and go to the page http://localhost:9222/.
Be sure your iPad is connected and not seeping and Safari is open: you should be able to see the open pages in your iPad’s Safari and connect to them!

Watch the magic as you hover your mouse on to the inspector and see the live highlight / changes on your iPad!

References:

Standard

2 thoughts on “How to use iPad’s web inspector on Ubuntu 14.04

  1. I get to this line
    ‘LD_PRELOAD=/home/timebandit/ios-proxy/lib/libplist.so /home/timebandit/ios-proxy/bin/ios_webkit_debug_proxy’

    and I see this

    bash: /home/timebandit/ios-proxy/bin/ios_webkit_debug_proxy: No such file or directory

    Please advise

Leave a Reply