Saturday, March 14, 2009

My first iPhone Practice App

I spent some time recently mucking with the iPhone SDK. I built this calculator from a tutorial I found after spending a fair amount of time wading through the materials on Apple's Developer site. First, I'm not a coder by any stretch, I have no experience with C, C++, objective C, what little I know is from Basic and Pascal from 20 years ago.

The iPhone is an amazing piece of hardware, and I have even more respect for some of the apps I have running on my phone now that I've been through this process. I typed the code in to get familiar with the editing interface, I managed to find and fix five bugs the compiler caught (mostly typos), however I almost got stumped by a seg fault once the app built and ran. After sleeping on it, I realized I had probably hooked up the code incorrectly in the Interface Builder (the instructions weren't very clear on that part). So I looked at another app that worked, and discovered my mistake.

At this point I can probably create a very simple, relatively static app that provides information (like the first aid apps, for example). But anything beyond that which involves more substantial logic and/or use of some of the cool hardware like accelerometer or GPS would require a lot of training in objective C. My understanding from my reading so far is that managing memory on the iPhone is much more manual than other environments, and can be a major issue if you're not careful about cleaning up. Probably explains why my phone runs better if I reboot it every once in a while.

Apple's desire to control the quality of apps in the Apps Store is understandable - one of the most attractive things about the iPhone is its immediate, consistent usability. Yet it's proving to be difficult to scale. There are something like 25,000 apps in the store now, and the process for getting them approved has slowed down dramatically. Plus there is talk of a Premium Store for apps costing $20 and up. How this will play out as the G1, with its open approach, or the RIM or Microsoft stores get going will be interesting. Support for Flash has long been a sore spot on the iPhone, as it would mean Apple losing control over apps. Yet it would open up the development environment to a much wider market. One thought I've had that might resolve this conflict for Apple is to provide something like HyperCard for the iPhone. I always thought HyperCard was an interesting, multipurpose tool, and it would be great to have that kind of flexible swiss army knife paired with the iPhone hardware.

No comments: