Saturday, July 26, 2008

iPhone 2.0 development woes

I really like being able to download native applications to the iPhone. Native apps are usable on the subway while web apps are not. Native apps can use all the capabilities of the device and use the full screen real estate and define their own controls and are faster to load and so on. Some of the first batch have bugs and the phone is a little more prone to crash than before, but that's to be expected and it's really easy to update them as bugs get found and fixed.

My chief complaint at the moment is that I can't get my apps on the iPhone. Even after waiting over three months for apple to approve my application to be a developer, paying Apple $100, giving Apple lots of information about myself and spending many many hours working on the problem, I can't even get a "hello world" to install. I can install to the simulator, but not to my own phone. The process one allegedly uses to accomplish installing your own code on your own phone is ridiculously convoluted, the error messages are useless, and I am stymied.

To get an app to install on the phone, one needs to generate a certificate request, use that to request a certificate, install that certificate and another one in my Keychain, use the new certificates and information about my phone to generate a "provisioning profile" (specified with an obscure and inconsistently-defined naming convention) - for "deployment" (and another one for "distribution" if I later want to send the app to Apple), install those certificates where Xcode can find them, and specify using an obscure panel within Xcode which certificate should be used when signing the application. Then just "Build and Go".

The result of this process is invariably the following bit of loveliness:
"Your mobile device has encountered an unexpected error (0xE8000001) during the install phase: Verifying application

Try disconnecting and powering off the device; then power the device on and reconnect it."


I miss the Newton.

UPDATE: Just to be clear on this: I really don't mind that Apple has locked down the device with DRM restrictions. What I mind is that they've done it so badly. The DRM on iTunes is practically invisible most of the time. One of my favorite design rules is "Get the base case right." For an iPhone developer, the base case - the first thing anyone is going to want to try - is to just compile something simple and see it on a phone. And the process for doing that is broken.

I don't care how carefully you think you've documented the 25-step process to start using your program, the problem is that it's a 25-step process. Stop polishing the web instructions to walk people through it and instead invest more effort on simplifying it. I'd be happy to download and run a software wizard. I'd also be happy to pay more for the dev kit - a lot more - if doing so would improve my own user experience and head off some of the frustrations.

And no, it's not just me who is finding this confusing. See here and here and here and here and probably here, though I don't really read japanese...

Come to think of it, iTunes music is an excellent model. iTunes locks my music so I can only use it on certain machines yet somehow it never requires the user to look up a serial number or copy certificate requests around or even explicitly use the Keychain Access utility. It all Just Works. That's supposed to be the Apple experience.