Created
December 1, 2013 21:15
-
-
Save rafaelp/7740885 to your computer and use it in GitHub Desktop.
Script to screenshot the iPhone Simulator to the correct size
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
#!/bin/sh | |
# script to screenshot the iPhone Simulator to the correct size | |
# to upload to iTunes Connect | |
# written by Jehiah Czebotar http://jehiah.cz/ | |
OUTPUTDIR=~/Desktop | |
TEMPFILE=iPhoneSimulatorScreenshot_`date +%Y%m%d_%H%M%S`.png | |
echo "output filename:\c" | |
read -e OUTPUTFILE | |
# activate iPhone Simulator so its easy to click on | |
osascript -e 'tell application "iPhone Simulator"' -e 'activate' -e 'end tell' | |
# capture the screen | |
screencapture -iowW $OUTPUTDIR/$TEMPFILE | |
# resize to the apple upload size, 320x480 | |
sips -c 480 320 $OUTPUTDIR/$TEMPFILE --out $OUTPUTDIR/$OUTPUTFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment