Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to simulate multiple iphones using xcode/iphone sim?

I'm planning out a game that requires multiple users and I was wondering if there's a way to fire up multiple instances of the iPhone Simulator. I didn't see anything in menus or in Google search results, but I just wanted to make sure I wasn't missing anything.

like image 552
Abel Avatar asked May 22 '09 05:05

Abel


People also ask

How do I run two simulators in Xcode?

If you require a different version of the iOS simulator than is provided by your Xcode installation, you can download additional simulators in Xcode. Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download.

How do I simulate an iOS device?

For iOS, tvOS, and watchOS apps, you can choose a simulated device, under [Platform] Simulators, from the run destination menu next to the scheme menu in the toolbar. To add additional simulators of a product family running older versions of the operating system, choose Add Additional Simulators.

How do you simulate an iPhone on a Mac?

Simulating Different iOS DevicesOpen the iOS simulator, if it's not already open. From the Hardware menu, select Device, and then select the type of device you want to simulate. The simulator window will change to match the dimensions of the device you selected.


1 Answers

It is possible but only with multiple users.

Read this: http://www.coderebel.com/2010/08/31/iphone_simulator

Assuming you have two projects (P1,P2) which you want to debug simultaneously, do as follows.

Steps to set up:

  1. Create a new user (U2) on your Mac
  2. Give it R/W access to P2, especially to its build folder.
  3. Download the launcher app from the site above and copy it to Applications.

Steps to debug:

  1. Close Xcode and the simulator if running
  2. Launch the iPhone Launcher.app with U1.
  3. Start Xcode with U1, load P1, start debugging.
  4. Launch the iPhone Launcher.app with U2.
  5. Start Xcode with U2, load P2, start debugging.

Unfortunately it's a P.I.T.A. having to change users every now and then but so far I haven't found any better solution. Hope this helps.

like image 109
lvsti Avatar answered Sep 29 '22 10:09

lvsti