The Simulator app requires several other large directories from the Xcode distribution in order to work at all. The only official way to install all of those properly is to install the entire SDK from the dmg.
The basic way to open a list of simulators is to use Xcode -> Window -> Devices and Simulators. Here you can create and manage all available simulators. But you cannot run them directly. You need to build your application on the simulator, and then you can run it.
Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download. When a simulator is opened from AppStudio, AppStudio Player automatically installs (if necessary) and opens in it.
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
(Xcode 6+):
$ 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
(Xcode 6+):
$ 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 ~/.bash_profile
:
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
(Xcode 6+):
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app'
(Xcode 7+):
$ 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:
$ simulator
The easiest way without fiddling with command line:
Next time you want to use it, just click on the ios simulator icon in the dock.
In XCode 7+ the location is now
/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
Run it from the command line
$ open -a Simulator
Hope that helps somebody
From Terminal you have to run:
open -a Simulator
No need to do anything on the commandline.
Just use spotlight to run simulator.app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With