Created
April 27, 2012 10:16
-
-
Save pmeinhardt/2508183 to your computer and use it in GitHub Desktop.
web-inspect mobile safari running in the ios simulator
This file contains hidden or 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
#!/bin/bash | |
# Based on Nathan de Vries' findings http://goo.gl/jbtzX | |
MSPID=$(ps x | grep "MobileSafari" | grep -v grep | awk '{ print $1 }') | |
if [ -z "$MSPID" ]; then | |
echo "Run \"Mobile Safari.app\" in the Simulater to enable remove debugging." | |
exit 1 | |
fi | |
cat <<EOM | gdb -quiet > /dev/null | |
attach $MSPID | |
p (void *)[WebView _enableRemoteInspector] | |
detach | |
EOM | |
open -a Safari http://localhost:9999 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment