I’ve been doing some development for the iPhone lately and came across a post by Craig Hockenberry where he give out a nice little bash script to make working with the iPhone simulator easier.

I’ve been using that script for a few months now and have added alot to it and think I should give back. I’ve packaged it up with a nice readme, posted it up on github and released it under the GPL.

Usage:

usage: /Users/trcjr/bin/opensim [ <app_name> | updateLinks <link_dir> [ Preferences | Documents | <cmd> <file> ]
ex: /Users/trcjr/bin/opensim updateLinks ~/iPhoneSimulatorApps
Creats symlinks for all installed apps in ~/iPhoneSimulatorApps
Note: <link_dir> must already exist.
ex: /Users/trcjr/bin/opensim SomeApp Preferences
Opens the Preferences folder
ex: /Users/trcjr/bin/opensim SomeApp Documents
Opens the Documents folder
ex: /Users/trcjr/bin/opensim SomeApp sqlite3 some_sqlite_database.sqlite
Opens runs sqlite3 with the full path to some_sqlite_database.sqlite as its first arguement

The README:

Opensim is a shell script that makes accessing applications on the iPhone
simulator a breeze.

Based on opensim by Craig Hockenberry

http://furbo.org/2009/03/03/open-sesame/

Examples.

opensim SomeApp Preferences
Opens the Preferences folder for SomeApp.
( ~/Library/Application Support/iPhone Simulator/User/Applications/<GUID>/SomeApp.app/Preferences )

opensim SomeApp Documents
Opens the Documents folder for SomeApp
( ~/Library/Application Support/iPhone Simulator/User/Applications/<GUID>/SomeApp.app/Documents )

opensim SomeApp sqlite3 some_sqlite_database.sqlite
Opens runs sqlite3 with the full path to some_sqlite_database.sqlite as its
first argument.
( sqlite3 ~/Library/Application Support/iPhone
Simulator/User/Applications/<GUID>/SomeApp.app/Documents/some_sqlite_database.sqlite )

Note:
If you have more than one file with the same name in two different
directories, ie db.sqlite in Documents/ and db.sqlite in SomeApp.app/
you would need to specify it by doing something like:
opensim SomeApp sqlite3 app/db.sqlite
This would open SomeApp.app/db.sqlite
opensim SomeApp sqlite3 Documents/db.sqlite
This would open SomeApp.app/Documents/db.sqlite

opensim updateLinks ~/iPhoneSimulatorApps
Creats symlinks for all installed apps in ~/iPhoneSimulatorApps
Note: <link_dir> must already exist.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • De.lirio.us
  • Reddit
  • Technorati
  • Facebook
  • Google Bookmarks

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

© 2012 Stupid Foot Suffusion theme by Sayontan Sinha