Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
AppleScript to hook up Safari web inspector to a connected iOS device or Emulator
# Customize and Export as Application
set device_name to "My iPhone"
tell application "Safari"
tell application "System Events"
click menu item "index.html" of menu device_name of menu item device_name of menu "Develop" of menu bar item "Develop" of menu bar 1 of application process "Safari"
end tell
end tell

This comment has been minimized.

Copy link
Owner Author

@amuino amuino commented May 25, 2013

Safari, or a PhoneGap application (or anything that has a webview, as long as you have a matching profile) needs to be open on the iPhone, and be a recent iOS version.

And having the web inspector enabled on the device:


This comment has been minimized.

Copy link

@Thinkscape Thinkscape commented Jan 21, 2014

I've enhanced it a little bit:

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