iPhone Development

After over six months, I’ve finally got my act together (and waited for Apple to get its act together) and can build my own iPhone apps. So far I’m using Unity’s iPhone Advanced tool rather than the “bare” SDK (Unity essentially builds an iPhone project for you, you still need to build the final app in XCode).

Using Apple’s tools, and I don’t think I’m violating any remaining components of the NDA by saying this, makes it clear that the SDK was released on a highly accelerated schedule. The amount of silliness involved in getting “Hello World” working on your iPhone is pretty amazing. It’s all a consequence of Apple wanting to make the iPhone world as safe and secure as possible.

In essence you have to jump backwards through a bunch of hoops to produce encrypted digital signing certificates and registering all your developers, testers, and so forth and their iPhones and iPod Touches before you can do anything. I won’t go into gory details because it probably is covered by the vestiges of the NDA and it’s boring, but take my word that the process involves a lot of non-obvious (even with a step-by-step checklist) steps that involve telling your left hand what your right hand is doing (i.e. stuff that should be automatic). It’s all very reminiscent of using Lotus Notes. (If you don’t know me, that’s worse than comparing it to Blender 2.3.)

The purpose of all this is to prevent people from installing “any old app” on their iPhone, and to allow Apple to flip a “kill switch” and disable any app which proves to be toxic to users (e.g. steals/destroys data or violates user privacy) or violates Apple’s unstated rules (e.g. don’t build anything vaguely related to web browsing or email) or Apple’s relationship with AT&T (e.g. don’t facilitate people using their iPhone as a cellular modem/base station). I have no objection to the purpose served by all this annoying cruft, but I do think the annoying cruft should be much easier to handle. Basically, all I should need to do is associate my iPhone with my developer account and click OK to have all the necessary crap stored in my keychain and I am done. Instead it’s 25 steps disguised as 12.

Unity’s iPhone tool is simply amazing. (This is amazing above and beyond Unity itself, which is plenty amazing.) During testing you can run your app in the Unity IDE as normal and use your iPhone as a tethered controller/display — Unity sends compressed video to the iPhone and receives the iPhone’s state over USB via a small app that comes with the dev tools. The only downside to testing this way is that your app is running on your Mac, so you don’t see the actual performance you’ll get on the iPhone, and the video can be a little artifacty (woohoo new word!).

So far it looks like you can have around 7,000 triangles visible and still get action game performance, or up to 25,000 triangles for more sedate games. The shader support on the iPhone is limited so blowing out the video hardware’s performance with fancy shaders isn’t really an option, so expect to see a lot of lightmapped scenery.

Anyway, MANTA (which I conceived of as an iPhone game) weighs in at 100-150k triangles visible on screen right now, so it’s not going to be running on the iPhone without some major surgery. I would still like to get it out this year, but my original planned Nov 30 release is impossible. (I’ll try to release the Mac version on time.)