'How can I launch the iOS Simulator from Terminal?

I can build using the Xcode command line tools, is there any way I can actually run the application using them? (E.g. the equivalent to pressing Cmd+R in Xcode)



Solution 1:[1]

Type this in terminal: open -a Simulator.app

Solution 2:[2]

open -a simulator 

it worked for me

Solution 3:[3]

As of this date (2022) it will work:

open -a simulator 

it is the easiest way.

Solution 4:[4]

Open your terminal and paste this code:

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

iOS Simulator Folder Path

Solution 5:[5]

This is the answer you are looking for:

  1. Open terminal

  2. xcrun simctl list

  3. Get udid of the device you want to launch

  4. Paste this in the terminal

  5. open -a Simulator --args -CurrentDeviceUDID 0566AC33-9B91-2DR2-B5BB-C916D3BA8MD3

Solution 6:[6]

Use xcrun simctl list to get a list of simulators and their UDIDs. Then open a specific simulator using xcrun simctl boot <UDIDs>

Solution 7:[7]

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

Solution 8:[8]

# Update In the new Xcode update, supported simulators are from iPhone 8 onwards

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Randika Vishman
Solution 2 Benjith Kizhisseri
Solution 3
Solution 4 Simon Hayter
Solution 5 yardstick17
Solution 6
Solution 7 Llogari Casas
Solution 8 Dionisio Malteso