Skip to content

Instantly share code, notes, and snippets.

@tomeraz
Last active January 17, 2024 02:14
Show Gist options
  • Save tomeraz/456b8e87217655f656e0d20ee8d18da7 to your computer and use it in GitHub Desktop.
Save tomeraz/456b8e87217655f656e0d20ee8d18da7 to your computer and use it in GitHub Desktop.
How to install remote debugging with Chrome dev tools for iOS devices safari on Ubuntu 16.04

install remote debugging with Chrome dev tools for iOS devices safari on Ubuntu 16.04

1. Install linuxbrew (Homebrew) for linux

http://linuxbrew.sh/:

sudo apt-get install build-essential curl file git python-setuptools
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
test -d ~/.linuxbrew && PATH="$HOME/.linuxbrew/bin:$HOME/.linuxbrew/sbin:$PATH"
test -d /home/linuxbrew/.linuxbrew && PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH"
test -r ~/.bash_profile && echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.bash_profile
echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.profile

2. Install libimobiledevice

https://github.com/google/ios-webkit-debug-proxy#installation

brew update
brew install --HEAD libimobiledevice
brew install --HEAD ios-webkit-debug-proxy

3. Install remotedebug-ios-webkit-adapter

https://github.com/RemoteDebug/remotedebug-ios-webkit-adapter

sudo npm install remotedebug-ios-webkit-adapter -g

4. Add ports to chrome inspect devices:

  • Go to chrome://inspect
  • Click Configure...
  • add localhost:9000
  • add localhost:9221

5. Restart Ubuntu machine.

6. Connect iOS device to USB.

7. Make sure Ubuntu machine is trusted by iOS device:

Open device and click "Trust" when prompted.

8. Open terminal and run remote-ios-webkit-adapter.

9. On iOS device, open Safari with a web page or an application with WkWebKit.

10. Go to chrome://inspect

Web pages on ios Device should be listed.

That's it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment