How to run iPhone emulator WITHOUT starting Xcode?
On my old Mac running Snow Leopard, I could type “ios” into spotlight and it would start up the iPhone/iPad emulator by itself.
I have since had to get a new machine running Lion. I have installed Xcode for Lion, I have installed the developer tool options from the preferences panel.
But the “ios” option is no longer there 🙁 The only way now seems to be to run Xcode, create an empty project and then launch emulator with the run option.
I have searched and searched the intertubes and the facewebs, but nothing helps.
Does anyone know how to run only the emulator on Lion?
THIS IS RESPONSE TO @ike_love thread below.
THAT answer is not assured to work on all Yosemite machines.
14 Solutions Collect From Internet About “How to run iPhone emulator WITHOUT starting Xcode?”
Assuming you have Xcode installed in
/Applications, then you can do this from the command line to start the iPhone Simulator:
$ open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
$ open /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app
You could create a symbolic-link from your Desktop to make this easier:
$ ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app ~/Desktop
$ ln -s /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app ~/Desktop
As pointed out by @JackHahoney, you could also add an
alias to your
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app'
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'
Which would mean you could start the iPhone Simulator from the command line with one easy-to-remember word:
The easiest way without fiddling with command line:
- launch Xcode once.
- run ios simulator
- drag the ios simulator icon to dock it.
Next time you want to use it, just click on the ios simulator icon in the dock.
is it helpful to you see the image
Now with new Xcode if the icon of the Xcode is on dock you can just right click it and form the menu you can select
Open Developer Tool and in the sub menu you can select the
iOS Simulator to open the simulator without opening the Xcode.!
You can get it to launch via spotlight if you create an Automator launcher for it:
- Choose type of Application
- Select Actions > Library > Utilities > Launch Application
- Open the dropdown of applications that can be launched and choose Other
- You can’t directly select the Simulator app because it’s inside the
Xcode.apppackage. So instead you’ll have to navigate to it in a separate Finder window and drag it onto the file selector window. It will be at one of the following paths depending on your version of Xcode (oldest to newest):
- Finally, save this Automator app in your applications folder as
To get a nice icon for the Automator app you just made, you can do the following:
- Right click
iOS Simulator.appand choose Get Info
- Click the icon in the upper left corner and do
Cmd-Cto copy it
- Right click your Automator app and choose Get Info
- Click the icon in the upper left corner and do
In XCode 7+ the location is now
Run it from the command line
$ open -a Simulator
Hope that helps somebody
Try below instruction for launching iphone simulator:
Goto Application Folder–>Xcode app–>right click to Show Package Contents–>now show files in xcode contents–>Developer–>Platforms–>iPhoneSimulator.platform–>Developer–>Applications–> now show iOS Simulator app click to launch iphone simulator…!
With Xcode 6 the location of the simulator has changed to:
It can no longer be found here:
I hope this helps someone since I sometimes want to start the simulator from terminal.
No need to do anything on the commandline.
Just use spotlight to run simulator.app
As the multitude of answers indicate, there are lots of different ways to address this issue. Not all of them address what is my number one issue, and what seems to be the asker’s priority, as well: The ability to launch from Spotlight.
Here’s the solution that works well for me, and should work with any OS X and XCode versions. I’ve tested it on OS X 10.11 and XCode 7.3.
Initial setup does require launching XCode, but after that, you won’t need to just to get to the Simulator.
- Launch XCode
- From the XCode menu, select Open Developer Tool > Simulator
- In the dock, control (or right) click on the Simulator icon
- Select Options > Show in Finder
- While holding down Command and Option, drag the Simulator icon to the applications directory. This creates an alias to it.
- If desired, rename the alias from “Simulator” to “iOS Simulator”. Whatever you name it is what it will show up as in Spotlight.
Note: There are other ways to get to the location of the Simulator app (steps 1-4), such as using Go to Folder… in the Finder, but those require knowing the location of the Simulator to begin with. Since that has changed from version to version of XCode, this way should work regardless of these changes.
- Launch Spotlight (command-space, etc.)
- Type “simulator” or “ios” (if you renamed the alias).
- If necessary, use the down arrow to scroll to the Simulator alias. Eventually, spotlight should learn and make the alias the top choice so you can skip this step.
- Hit return
The solutions above didn’t work for me in ZSH. I needed to escape the dot in the iPhoneSimulator.platform. This works for me:
alias simulator="open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app"
This could be even more resilient version:
alias simulator="open -a 'iOS Simulator'"
There’s a far easier way:
space, Spotlight Search will appear
- Type in
iOS Simulatorand hit
—– In follow up to @E. Maggini downvote—
Yes you can still easily access
iOS Simulator using
- Go into Finder.
- On the sidebar, click applications.
- Find Xcode in Applications.
- Right click Xcode by whatever settings you have (usually two finger click [not tap]).
- Click “Show Package Contents.”
- Go into the Contents folder.
- Search simulator.
- Wait 30 secs for it to load.
- Scroll down and find iOS Simulator.
- You may drag this onto the dock for easier access.
I hope this helps!
From Terminal just run this command:
Or,add this to your
~/.profile to save yourself a few keystrokes:
alias ios="ios-sim start"
Not sure which version of Max OS X and Xcode this command became available. I’m running 10.10.3 and 6.3 respectively.
In the terminal:
For Xcode-beta 9.x
$ open /Applications/Xcode-beta.app/Contents/Developer/Applications/Simulator.app
For Xcode 8.x
$ open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
- iPhone app Update Vs new version
- How can I make a UIKeyCommand with the return/enter key?
- Touch ID Issue with Sandbox Purchases
- Swift 3 first parameter names
- Video Saving in the wrong orientation AVCaptureSession
- No sound coming from AVPlayer
- Does NSURLConnection Block the Main/UI Thread
- How can I define the custom UIGestureRecognizer in Swift?
- Why can't I register my iOS application to handle the image file type?
- Merge arrays with condition
- Canceling interactive UINavigationController pop gesture does not call UINavigationControllerDelegate methods
- How to Upload video to server from iPhone?
- iOS UITableView Scroll to bottom of section
- Xcode 4.2. gets stuck “Attaching to myapp” when running
- Iphone, Obtaining a List of countries in an NSArray