Return of Open Sesame

Craig Hockenberry (from the IconFactory) published in 2009 (on his personal website furbo.org) a very useful script able to open the Documents folder of any app installed in the iPhone Simulator. Because the iPhone simulator is now able to run with different versions of the iOS SDK, it has stopped working.

Here’s an updated and working version:

#!/bin/sh 

if [ -z "$1" ]; then
  echo "usage: $0  [ Preferences |  ]"
else
  app=`ls -1td ~/Library/Application\ Support/iPhone\ Simulator/*/Applications/*/$1.app`
  dir=`dirname "$app"`
  if [ "$2" = "Preferences" ]; then
    open -R "$dir/Library/Preferences"
  else
    open -R "$dir/Documents/$2"
  fi
fi

Below is the original text describing how to use it:

Put this script somewhere on your PATH and name it opensim. Use it to find the most recent application loaded in the simulator and open the Preferences, Documents or a named document in the Finder.

For example, to open the current Documents folder for an application in the iPhone Simulator, just do this:

$ opensim Thunderbird

To open a document within that folder, you can do this:

$ opensim Thunderbird chockenberry.db
$ opensim Thunderbird accounts.plist

You can easily get to your preferences folder with:

$ opensim Thunderbird Preferences

Notice how I haven’t mentioned a GUID in this essay? That’s the feature…

© 2012 Craig Hockenberry. All rights reserved.

2 réflexions au sujet de “Return of Open Sesame”

  1. Hi,

    The about-file of WakeUp tells me that you’re the original maker of it. I’m happy that this little program still works well under Mountain Lion!

    Kind regards

Laisser un commentaire