Skip to content

@vilcsak /iphone-screenshot
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Automate capturing screenshots of the iPhone simulator
#!/bin/sh
# A) Run ./iphone-screenshot
# B) Type in the screenshot filename
# C) Click on the iPhone simulator
OUTPUTDIR=~/Desktop
TEMPFILE=iphone_screenshot_temp.png
echo "output filename:\c"
read -e OUTPUTFILE
osascript -e 'tell application "iPhone Simulator"' -e 'activate' -e 'end tell'
screencapture -iowW $OUTPUTDIR/$TEMPFILE
sips -c 960 640 $OUTPUTDIR/$TEMPFILE --out $OUTPUTDIR/$OUTPUTFILE
rm $OUTPUTDIR/$TEMPFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.