How to change the default Xcode iphone simulator when testing

Viewed 79940

I don't know why but now the default iphone simulator launched when I build the project is "ipad", but I want it to use iphone 3g instead.

Any way to set this preference?

14 Answers

On Mac, if you right click on the Simulator icon, you can select devices and it will open a new device.enter image description here

Or go to File -> Open Simulator

In the chance that anyone reading this is building their app in react-native, the solution is the --simulator option.

For example:

$ react-native run-ios --simulator "iPhone X"

2022 Fix:

You have two options!

  1. With the simulator running go to File > Open Simulator > iOS [current version] and select the desired device.
  2. With the simulator running, right click the icon in the bottom toolbar, select Device > iOS [current version] and select the desired device

If you are using Expo, after selecting the new device will open in a new window, so you'll have both. Heres how to get Expo to run on the new device:

  1. Close the device window you don't want (cmd + w)
  2. You will now be able to "Run on iOS Simulator" and it will open up Expo Go on the new device.

2020 Fix:

  1. With the simulator running go to File > Open Device > iOS > iPhone 11 and select the device. It will open up the device as another window but there won't be the Expo app.
  2. Close the device window you don't want (cmd + w), then close the window with the device you would like.
  3. Restart Expo (in the command window with it running do ctrl + c then re-run Expo with expo start
  4. You will now be able to "Run on iOS Simulator" and it will open up with the selected device type.

Try Project > Active Executable , and select the one you want the most.

This worked for me. When I already have the app open on an iphone in "Simulator". I click File -> Open Simulator -> iOS 14.0 -> iPhone 8 (or iPad (7th generation))

If you are using Flutter, open the Runner.xcodeproj file in ios/ folder. Then right next to the Runner breadcrumb, you can click >and select what device to launch.

Related