1

I won't have access to a smartphone for some time, but I'm wondering if there's some kind of app or terminal command that allows you to run two instances of an iOS simulator for a single project.

One method I tried was cd'ing into my applications directory, and running two instances of the iOS simulator (as instructed in this stack overflow thread)

cd /Applications/Xcode.app/Contents/Developer/Applications
open -n iOS\ Simulator.app
open -n iOS\ Simulator.app

But I have no clue from here how to add my project. My rep also isn't high enough to comment, so I made a new post. Hopefully someone else has this same problem.

Community
  • 1
  • 1
Swills
  • 153
  • 2
  • 16

1 Answers1

4

It is indeed practicable but a bit cumbersome. You start two instances of iOS Simulator. You need to use two different simulators. From the preset ones, for example iPhone 5 and iPhone 5s. If you need the same device, you can create a new one in Xcode (Window -> Devices).

Compile and run the app on the first simulator, and quit. Then compile and run on the second simulator. Each time you try to run the app while having two instances of Simulator opened, Xcode will complain "Unable to boot device in current state: Booted" beacuse it switches both simulators to the same hardware profile. Just ignore the warning and switch one of the simulators back.

Now you have two Simulators with your app preinstalled so you can simply run it simultaneously. I tried and they successfully connected to each other.

samuelg0rd0n
  • 1,080
  • 2
  • 15
  • 27