iPhone development joy
Seeing as it’s been a year now since I began coding for iPhone, I felt like rambling a bit on that topic…
I got my 1st gen iPhone in September of 2007, and knew within minutes of actually using the thing (rather than just drooling over photos and videos) that iPhone was going to be huge. The end user experience is too amazing for that not to be the case.
I upgraded to a 3G as soon as I could, which happened rather uneventfully (no lines, no wait) in July of 2008. Initially, as it did for most, my battery life sucked. Fortunately, Apple released a firmware update, that for me at least, made that pain a issue of the past. It’s been smooth sailing ever since, and as anyone who knows me will attest, separating me from my phone would be more difficult than moving a mountain. One colleague even jokingly asked me what I would do if I had to choose between my iPhone and my wife…
My first application for iPhone was a call forwarding toggle that I implemented last January, using the GCC tool chain and my jailbroken 1st gen iPhone. The problem I had is that the built-in mechanism for enabling/disabling call forwarding is 5 or so levels deep in the system configuration app, which is a rather lengthy pain if you want to quickly change your forwarding settings. I have an Asterisk based PBX I run on a server at home that provides phone and fax to our house, and every evening when I return from work I have my cell forward to the house system. When I leave in the morning, I disable forwarding and allow the cell to do its own work during the day. This forwarding application allowed me to quickly turn forwarding on/off as necessary, just by launching the application.
The system settings application provided by Apple uses private APIs to interact with the carrier network to deal with these settings, but it is possible to dial GSM codes via dial URL, or manually from the dial pad to accomplish the same goals, which is what my app used. That is, until the official SDK came out and disallowed the use of certain special characters in a dial URL… Specifically, the special characters necessary for GSM codes, despite the fact that you can still dial them on the keypad.
Sigh.
When the official SDK came out, my first app was a collaboration with a colleague to spruce up the forwarding app and allow multiple numbers to be stored, so one could have multiple forwards at the ready. Sadly, we didn’t find out about the character limitation until everything else had been coded… The issue is that an attempt to open a URL with a dial string which has special characters silently fails. No errors, no warnings, no nothing. We used one of our two developer account support requests to ask why, and were told by Apple that it isn’t supported by the public API, and that if enough requests are received for opening dial characters up it may change some day. So, App #1 was shelved and work began on several other applications in our free time and solely for fun. So far two have made it to the AppStore, and while they’ve not made anybody rich, they’ve more than paid for the cost of the developer licenses, which is just fine. At the moment, there are 5 others at various stages and I continue to struggle to set aside enough time to get anything meaningful done on them these days. They’re all more ambitious than the current two, and use more aspects of the device, which makes development a lot more involved.
All in all, iPhone development is very rewarding, and Apple has done a phenomenal job of providing clear high level abstractions for dealing with complicated device internals. It requires very little effort to use data from all of the most interesting bits of the device, such as accelerometers, touch events and location services. I’ve done a fair bit of user facing development in my day, and can honestly say no other SDK/API/etc comes close. The iPhone SDK/APIs do exactly what they should, they get out of your way and allow you to make interesting software.
It would be great if Apple would open up the private APIs for video, phone etc. It’s a bit perplexing that they’ve held some stuff back, and makes one wonder who/how they decided what is/isn’t “private”.
Kudos to Apple for putting together a hell of an end-to-end environment. Nothing is perfect, but they’ve done a better job of bringing it all together than anything else I’ve ever encountered, with the IDE, simulator, device, SDK/APIs, marketplace and community, all that’s left is for creative people to cook up the goods.