How do you set the default device in the iPhone simulator?

Viewed 37401

Every time I switch Xcode between debugging on my iPhone and running in the simulator it resets the simulated device. I want to run the simulator as an iPhone device, but it keeps changing back to iPad. Does anyone know how to set the configuration so that the simulator defaults to an iPhone device?

I can switch the hardware to iPhone inside the Simulator, but when I go back to Xcode and run a "Build Debug" it reopens the app inside an iPad. The only way I can get it to switch is by using the Overview menu in Xcode, the choices I see are iPad Simulator 3.2 and iPhone Simulator 4.0

And when I switch between device and simulator then it always goes back to iPad.

6 Answers

In Xcode 9 you can select multiple devices. However an easy way to default to your favorite device is the following:

  1. Choose your device from simulator-hardware-device-os you are working on
  2. Now go to simulators - windows and turn off “ show device bezel”
  3. Now simply close the ones you don’t want

in iOS simulator go to :

File / Open Device / iOS 'versión' in my case (iOS 13.7) / Select the one you need

next time you open the simulator will be open with the device selected.

Related