Last active
April 29, 2017 06:47
-
-
Save amuino/5649177 to your computer and use it in GitHub Desktop.
AppleScript to hook up Safari web inspector to a connected iOS device or Emulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Customize and Export as Application | |
set device_name to "My iPhone" | |
tell application "Safari" | |
activate | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html