227

I want to delete an app in the simulator before I "build and run". How can I start the simulator so I can do the deletion? If I start it by "build and run" I get a long log output that takes a while because of a bug I'm trying to fix. I'd like to avoid that.

RobertL
  • 14,214
  • 11
  • 38
  • 44

11 Answers11

386

The simulator is just an application, and as such you can run it like any other application.

To open it in Spotlight, search for Simulator.

To run the simulator straight from terminal, prepend these locations with the open command.

Xcode 7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x, and 14.x

In Xcode 7.x - 14.x, the iPhone Simulator has moved again: /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app.

Xcode 6.x

In Xcode 6.x, the iPhone Simulator has moved yet again, and now resides here: /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app.


Xcode 4.x, 5.x

In Xcode 4.x (through 4.5 on Mountain Lion) and Xcode 5.0.x on Mavericks, it lives here: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/

In my version of Xcode (4.5.2), I find it quite convenient to use the Open Developer Tool menu from either the dock icon or the Xcode menu:

open iOS Simulator


Xcode 3.x

In Xcode 3.x, it lives here:

/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app


In some future version of Xcode, it will probably move again, it's a squirrelly little app.

Seth
  • 45,033
  • 10
  • 85
  • 120
  • 4
    @jimbojw - It's a application bundle, so yes it's a folder too. If you double-click it (or use the `open` terminal command), it will run. Incidentally, it's called "iOS Simulator.app" with newer iPhone SDKs. – Seth Mar 27 '12 at 22:58
  • 4
    The full path I found this at was `/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app` – Michael Mior Jul 12 '12 at 13:23
  • 3
    Also note that if you go the path in the above comment in Finder, you can just drag the simulator down into your dock like any other app. – Mike Aug 07 '13 at 00:50
  • Do you guys know if there's a way to change it to other iOS simulator? ie iPhone 4 and iPads (retina and non-retina) – guest Mar 17 '14 at 17:45
  • 2
    I found it at "/Applications/Xcode.app/Contents/Applications/iOS Simulator.app" . To change devices, from within the simulator app, click Hardware > Devices. – Cheeso Apr 15 '15 at 18:53
  • For Xcode 7 the app is now simply named Simulator.app. Guess this also makes more sense, since it also simulates lots of other iOS devices than the iPhone. – Jan Aagaard Nov 19 '15 at 10:38
  • How to change simulator type in this case ? Each time it opens same one – vikramvi Aug 31 '18 at 13:58
  • confirmed the instructions for Xcode 7, 8, and 9 still works for Xcode 12.3. – scottysseus Jan 09 '21 at 18:45
66

From Terminal you can use:

open -a iPhone\ Simulator
open -a iOS\ Simulator
open -a Simulator

This all depends on the application name of the simulator, this can change with each iteration of Xcode.

atreat
  • 4,243
  • 1
  • 30
  • 34
  • 8
    This is the easiest solution by far. If it doesn't work, try with `iOS\ Simulator` instead. – Felix Mar 15 '15 at 13:12
45

To pick a specific simulator you can first open the Simulator application

enter image description here

Then right click on the icon, and select from the devices.

enter image description here

Felipe Centeno
  • 2,911
  • 1
  • 21
  • 39
35

Since XCode 4.3 the location has changed, the simulator can now be found at:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/

inta
  • 570
  • 2
  • 11
  • 16
24

To follow up on that the new command from @jimbojw to create a shortcut with the new Xcode (installing through preferences) is:

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app

Which will create a shortcut in the applications folder for you.

user1450909
  • 241
  • 2
  • 3
20

Use Spotlight.

But only the last simulator will be opened. If you used iPad Air 2 last time, Spotlight will open it. If you wanna open iPhone 6s this time, that's a problem.

Jaybo
  • 944
  • 10
  • 13
8

This is an older question, but if you simply want to run the simulator from the Xcode 4.5 UI, you can do: Xcode > Open Developer Tool > iOS Simulator.

delliottg
  • 3,950
  • 3
  • 38
  • 52
  • 2
    The Open Developer Tool menu is also accessible by right-clicking on Xcode in the Dock. https://www.facebook.com/mattdipasquale/posts/880720811276 – ma11hew28 Oct 08 '12 at 21:42
  • @joeriks I know exactly how you feel! I spent 10 years working at MSFT on Windows! – delliottg Nov 01 '13 at 15:27
7

First, add the iOS Simulator to Applications:

ln -s /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app

From there you can open it in Finder or drag it to the launch bar.

Source: http://www.bram.us/2010/05/05/xcode-iphone-simulator-location/

jimbo
  • 11,004
  • 6
  • 29
  • 46
6

The easiest way is start the simulator from the Xcode, and then on the dock, Ctrl + Click on the icon and select Keep in Dockenter image description here

Thai Tran
  • 9,815
  • 7
  • 43
  • 64
4

Without opening Xcode:

open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app/
bolinfest
  • 3,710
  • 2
  • 27
  • 40
  • 1
    To that, I added an alias to ~/.bash_profile: `alias ios="open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app"` which lets me just run `ios` from the command line. – hayesgm Mar 03 '15 at 18:29
  • 1
    FYI, on my machine the application is just `Simulator.app` not `iOS Simulator.app`. – Joshua Pinter Feb 12 '17 at 20:51
2

For Xcode 7.2

open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator.app

sudo ./Simulator

And adding this path in your profile is the best way.

Dheeraj Gupta
  • 372
  • 5
  • 20