views:

211

answers:

3

When I connect two iPhones at the same time to my computer and Build and Run a project the app only installs and plays on one of the devices.

Now, with the iPhone 3.0, that supports bluetooth peer-to-peer connectivity, to test a multiplayer project you have to install and run it on two devices at the same time. It would be very helpful to be able to do that with one click instead of: install on one phone, disconnect, connect the other, wait a 10 seconds to recognize the phone and install again and run...

Is anyone aware of a method to do such a thing?

Thanks

+1  A: 

Not tested but worth a try: Start another instance of Xcode (e.g. from the command line) and use the second device from there.

> /Developer/Applications/Xcode.app/Contents/MacOS/Xcode &
Nikolai Ruhe
First of all, i can't start a new instance of the same project.But even if i do, what's gonna happen every time i make some changes to the project? I have to restart the second instance from the console again etc...? It might take as much time as copying the project to another folder and running from there. Which is similar to the wait time you get for swapping the phones, but a bit more dangerous :)
Dimitris
+1  A: 

Funny you should ask. I posted step-by-step instructions on this very subject up on my blog this morning. I won't repeat it here. Here's the link: http://ramin.firoozye.com/2009/06/18/debugging-peer-to-peer-and-wifi-apps-on-the-iphone/

Ramin
That's a good idea but it's very time consuming to set up, not to mention expensive. I think (or hope) that Apple will update XCode to fix that in the near future, since p2p apps for the iPhone will be more and more common.
Dimitris
+1  A: 

If you happen to have access to a Mac lab ( college / university lab) with the iPhone sdk installed, you can test p2p applications. The simulator does not support Bluetooth but they can still be tested this way. On one Mac goto the wifi icon and select create a network, call it something, on the second Mac goto the wifi icon and select the network you just named. Load your code into xCode on both machines and run the simulator. I've tested my bluetooth p2p app this way and it works fine.

If you don't have access to a lab, sorry.

Rich
This sounds useful, thanks. But still I'm looking for a way to build for 2 devices..
Dimitris