Tricks To Open Two XCode Simulators Simultaneously

The problem
 
While developing a Chat Application, I needed  two or three devices for Unit testing. This was bit costly as well as a bit painful, as I needed to register the devices to a Partical Developer certificate and reinstall an app in each device after any minor changes. Thus, for me, the only option was using Simulator.
 
The solution
This problem can be fixed by opening multiple simulators, but how? Here we go .
 
Trick
[ In this demo, I will create a hello world app and will open the same app in iPhone 7 and iPhone 6 simulator simultaneously].
 
Step 1
 
Run the app in iPhone 6 and iPhone 7.
 
Step 2
 
Open the terminal.
 
 
 
Step 3
 
Change Directory in the terminal to /Applications/Xcode.app/Contents/Developer/Applications/
 
 
 
Step 4
 
In this directory, open the Simulator app. By writing the command, open -n Simulator.app.
 
 
 
Step 5
 
Press Enter. If your iphone Simulator selects an iPhone 6, it will open iPhone 6 Simulator, as shown below.
 
 
 
Step 6
 
To open the anothor Simulator (iPhone 7 in my case) repeat step 4. This time; we will get a warning of exactly " Unable to boot device in the current state: Booted ".
 
 
 
Step 7
 
Select un opened simulator, go to Hardware > Device > iOS > iPhone 7, select it and it will open iPhone 7 Simulator. 
 
 
 
We are done. Enjoy with your two Simulators.
 
 
 
Happy coding.
Ebook Download
View all
Learn
View all