Think you can only develop for the iPhone on a Mac? Ars chats with an …

Share this story

"Just buy a mini" has become an iPhone development mantra. We take it so much for granted that, for just $600 plus the $99 iPhone license, anyone can get set up and get going with iPhone development. We just assume the Mac mini will win people over to the unflagging charms of Mac OS X. And you know what? There's a lot of truth in that assumption, but it certainly doesn't hold true for everyone. Some people, legitimately and reasonably, cannot stand OS X. Their brains, their fingers, their work flows have been tuned for Windows development, and forcing them into Xcode is nothing less than torture.

Over at Just Kissed Games, developer Chad W. Randall has shared his experiences developing for the iPhone. After giving things a fair shake, he still ended up hating Xcode and the mini. So instead, he returned to Visual Studio by cobbling together an iPhone development system that let him work in his preferred environment with minimal Mac use.

Over the course of a month, Randall built a re-usable base on the Mac-side. This base framework provided file system access, touch interpretation, OpenAL audio and OpenGL window calls. With the Phone-specific calls covered, he could then turn his attention to actual gaming logic on his PC.

The PC development side consisted of two OpenGL windows representing landscape and portrait views. These windows translated mouse movements into "touches," similar to fingers. The right mouse button simulated a second finger, similar to the iPhone simulator on the Mac. In addition to touches, Randall added keystroke equivalents for standard system events including the Home button press, the lock button, low memory conditions, incoming calls and so forth. He used a pop-up dialog to stand in for the iPhone's keyboard, and added other placeholders to represent iPhone UI elements. In the end, he not only matched the Simulator's event suite, but built upon it to add events that Mac-based developers would love to see included.

Using these tools, Randall built Besiegement (iTunes). Besiegement is a tower defense game with 30 game levels and 18 unlockable achievement goals. To allow testing, he set up his environment so source file edits on his Windows machine could instantly update the project on the Mac. This let him make code changes in Visual Studio and test the results on the actual iPhone within seconds.

His final product is fully compiled; there's no interpreted code, so it had no problem making its way into App Store (iTunes). Although he worried that Apple would object to the fact that it wasn't fully developed on OS X, it actually made it onto App Store within 24 hours of submission.

If you're a Windows developer who wants to try this out, Randall tells me you'll need a firm grounding in C, C++, and Visual Studio. You'll also need to at least own a Mac or borrow one so you can do the final compilation. The framework is provided for free, as-is. You can contact Randall at the Besiegement Game website to request a copy.