iPhone OS 3.1 & GameKit Pt. 1: Woooohooo!

YEAH!

In GameKit on the iPhone OS 3.1 you can now connect devices with the simulator via Bluetooth!
Finally no more device swapping and cable chaos!
Thank you Apple!
PS: It works for me on my iPhone 3GS + MacBookPro 13″. Let me know in the comments if it works for your setup, too.
UPDATE: Today I could not reproduce the situation, it wouldn’t work. Then I realized it is only working when the device and the mac are on the same wifi. Also, it only seems to work when the device is in host mode, and the mac in client mode. So, no bluetooth 🙁
UPDATE2: Yep, I ran some more tests, and I’m pretty confident now. Pulling the network cable and plugging it back is the most efficient way for me to kill the gamekit connection at the moment, so, to summarize:
GameKit works with device and simulator iff you are on the same network and the iphone is in GKSessionModeServer.

UPDATE3: I fiddled more, and suddenly it also works the other way around, ie when the mac is in GKSessionModeServer, and the device is in GKSessionModeClient. Just can’t get it to use Bluetooth.
I also noticed that the “reaction time” of the device is much longer. I have a very simple program that simply pongs back as soon as it receives a ping message. If i send it from my mac to the phone and then back, it will be around 5-10ms. However, doing the same the other way around, from phone to mac to phone, takes 50-100ms+. This is pretty odd, because it appears to be symmetric, but it’s not.

2 thoughts on “iPhone OS 3.1 & GameKit Pt. 1: Woooohooo!

  1. I've observed that issue with the 3GS and WiTap, for instance. Based on some discussions in the dev forum, I'm beginning to suspect there is an issue with the thread scheduler on the ARM7 platform. I don't see this issue on my ARM6 iPhone 1,0. Perhaps this issue is what drove the creation of new Display Link class? Maybe the power management on the Cortex-A8 is too aggressive with throttling the CPU or discarding interrupts (or something)!?

    Anyways, great series of articles. Thanks!

  2. The good thing is that once you know how it works, it's not that much of a problem. And after all, saving battery is always appreciated. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *