Skip to content

Instantly share code, notes, and snippets.

@hboon
Created November 7, 2012 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hboon/4029350 to your computer and use it in GitHub Desktop.
Save hboon/4029350 to your computer and use it in GitHub Desktop.
Open app in Simulator with Finder
#!/bin/sh
#Modified from http://furbo.org/2009/03/03/open-sesame/
if [ -z "$1" ]; then
echo "usage: $0 <app> [ Preferences | <document> ]"
else
app=`ls -1td ~/Library/Application\ Support/iPhone\ Simulator/*/Applications/*/$1.app | head -1`
#app=`ls -1td ~/Library/Application\ Support/iPhone\ Simulator/User/Applications/*/$1.app | head -1`
dir=`dirname "$app"`
if [ "$2" = "Preferences" ]; then
open "$dir/Library/Preferences"
else
open "$dir/Documents/$2"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment