'iPhone apps: or how Nic gets to the party REALLY late'

Yup, I've finally pulled finger and sat down to do some iPhone development, right in time for the iPad's release. No, that wasn't the reason - I just finally have a "spare day" to do stuff in, and the other (non-day-job) project was allowing me some spare time.

I had two projects earmarked as learning projects, which is always the problem for me - get an idea which isn't something I want to put up on the store (ok, maybe...), but meaty enough to make it worth while doing. A tip calculator does NOT pass that test. These two I did do.

First app I did was a small earthquake lister. USGS provides a RSS feed for all of the earthquakes worldwide which are over 2.0 on the richter scale. The idea - stolen, I thought, from the Android samples - was to get the list, show it in a list on the phone, then when the user drills down, show more info and a map.

I found out later that this is a sample that Apple ship, too, so I purposefully didn't refer to it, so I kept my learning a little cleaner.

In general, it was rather easy. Cocoa has native classes for downloading from a URL (and there are easier ones than I used), XML parsing, as well as all the visual components that you expect to see in an iPhone app. I had a bit of fun with the memory management (thanks James and Shaun), but that was easily fixed once I got the retain/release/autorelease thing sorted.

I learned afterwards that I didn't need to make a custom UITableViewCell, as the default one has what I needed, but it was good for learning. I wish I could do offline maps, but thats for another time / app.

All up, it took me about 6 hours to do this, including a load of documentation reading.

The second app is a small twitter app, which scratches an itch I usually have at conferences where there is little or no bandwidth. The goal was to be able to press a button, type in your message, hit send, and be done. No list of posts. No adding new followers. If you want that, you have too much bandwidth and should go get Tweetie 2 - this is not the app for you.

All up, this was also an easy application to write. I had to learn how to integrate someone else's code - MGTwitterEngine from Matt Legend Gemmell in this case, as well as how to handle errors, lack of connections, how to get editing going in a UITableViewCell, overlays, CoreAnimation, HUDs and the like.

All up, I like the power and focus of Cocoa and CocoaTouch. They give a massive amount of power to the user, even if I'm still stuck managing memory, something which I've not used to doing since I left Delphi behind in 2004. I'd put them in the same class as the base .NET libraries and WPF. If you include all the other stuff which is "in" .NET, Cocoa doesn't have that reach, but for what its designed to do, it does it exceptionally well. I have to keep in mind that I've learned .NET over 6 years or so, not a weekend, so the frustrations of "how do I do X" are going to be normal, and with me for a little while.

So, now for the one which might actually get some use.