On the other side of the crunch

The WWDC keynote announcement that iPhone OS 3.0 would be released in a little over a week caught us a bit by surprise: the next edition of our iPhone SDK Programming book was nearly ready to go, but we’d waited until WWDC to resolve some blockers. Now we had a week to get the new version ready for the public release of 3.0 and the end of the NDA for that version.

The biggest blocker for me had to do with the Bluetooth peer-to-peer features in the new Game Kit framework. The problem is with device support: first-gen iPod touches don’t have Bluetooth, and the first-gen iPhone (which I have) has an older Bluetooth chipset that Game Kit doesn’t support. So back in April, I bought a second-gen iPod touch, largely for writing this chapter.

Unfortunately, it turns out that the iPhone Simulator doesn’t support Game Kit’s Bluetooth networking, even on Macs with Bluetooth. So, to develop and test a P2P game, you need two recent iPhone OS devices.

I could have waited until Friday, when I’ll be buying an iPhone 3GS (which surely will have Game Kit-capable Bluetooth), but to get the chapter out for the new version of the book, I wrote blind code on Tuesday and Wednesday, and spent Thursday morning in the iPhone Lab with Apple’s test devices, and the Game Kit engineers handy to answer my questions.

After a couple hours, I had P2PTapWar running on the two devices. This is an asinine little game that lets two players find out who can tap their screen the fastest.


I’m glad we got this chapter into the book, the latest beta of which is available today. It went well enough, in fact, that a section of the Game Kit chapter is one of the new free excerpts available on the book’s page.

Now to finish up our remaining issues with this book and get it to the printer.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.