Open the only iPhone Simulator from the terminal

Ok, it’s been a long time since my latest post… and today I just want to share a quick tip to open the iPhone (iOS) simulator app.
I’m testing a mobile site I’m building and I noticed that the simulator app has been embedded into Xcode bundle, so is it not possible to launch it using Spotlight (as I usually do with every application)… so once I understood where it is located I’m now invoking it using the open command from the terminal in this way:

open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app

Update:
Due to recent changes in OSX/xcode, the path has now changed to:

open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app
  • Beau

    Make it even easier on your self and put this in your ~/.bash_profile :

    alias ios=”open /Applications/Xcode45-DP3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app”

    And then all you type is:

    > ios

  • mashhoodr

    another nicer way is to use a -a argument for Xcode.

    This works for me on Mountain Lion:

    open -a “iPhone Simulator”

  • combine the two above great comments:

    alias isim=”open -a ‘iPhone Simulator'”
    >isim

    WITH YOUR POWERS COMBINED…..!!!! :)

  • It is just “open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app” now