Tuesday, March 18, 2008

More on the iPhone SDK

So it turns out that, despite what Apple insisted, the iPhone SDK works pretty much out of the box on PowerPC based machines, and you don't have to be a member of the iPhone Developer Program to download the SDK. Both these things are good news, because as a Brit, I don't get to be part of the developer program, and I still don't have an Intel machine running Leopard.

So I've downloaded and installed the SDK on my G5 iMac, and it seems to work okay...

The problem? Like others I'm suffering under the frustration of Error (34) which means than, presumably due to the lack of a signing certificate, I can't even upload my applications to my own iPod to test them.

Interestingly when building for Aspen, rather than the Aspen simulator, and unlike others, I'm not getting any complaints about my missing signing certificate, just the predictable warning about target architectures.

My initial reaction is to guess that the mysterious Error (34) is probably down to the fact my iPod touch is running firmware 1.1.4, rather than the new revision 2.0 which won't as far as I know be available till June. Or possibly it's something to do with the apparent problems with 64-bit architectures and the new SDK. Who knows, Error (34) is a bit opaque after all...

Suffice to say I've gone back to working with the rather less friendly hacker SDK, at least till Apple gets its act together. There isn't a lot of point writing applications if I can't upload them to actual test hardware.

Update: So you don't need firmware 2.0, but you do need the signing key? Wonder how long the developer program will take to roll out to the UK?

Update: Okay, that's interesting. Despite Error (34), the applications are uploaded to the iPod, but rather than ending up the /Applications/ directory, they end up in /var/mobile/Media/PublicStaging/. Moving one of these applications from PublicStaging to Applications and restarting SpringBoard drops the uploaded application onto the SpringBoard display. But, it has a default icon rather than the icon that's included in the package. Not a good sign. SSH'ing into the iPod and poking around inside the application bundle, shows that the binary doesn't have its execute bit set. Setting the application so that it can actually be executed, and clicking on the icon on SpringBoard, does actually get us somewhere. The Default.png background image opens, but then the application crashes.

At this point I think I've demonstrated, at least to my own satisfaction, that all that's missing here is a signing certificate. I just wish Apple had provided a more understandable error message to tell us this, you'd think it wouldn't have been that much more effort? and it would have saved a lot of people, a lot of trouble.

Update: Ah now that's interesting as well. After plugging my iPod back into my development machine I get a pop-up to say that the iPod contains diagnostic information that might be useful to Apple. Clicking on further details, and it's the crash logs from my test applications...