I have been working on the iPhone app for RecordBox for the past few weeks. It is coming along well and I have the skeleton of an app which can record audio and upload it to a RecordBox account.

I had no experience with IOS development before this app, and did not know anything about the Objective-C language either. (Objective-C is the de-facto programming language for iPhone apps). Given that I started a little over a month ago, I think the progress has been rather brisk: I hope to have a first version of the app out in a week from now.

I am going to share how I got started developing an IOS app to interface with my Rails web-application. I think everyone charts their own course through this maze, and if sharing mine helps fellow programmers down the line, it will be very satisfying. So here goes!

The necessary ingredients for the first step

I always find that the first step in learning a new language or technology is the hardest one. At this stage you have to commit to course of learning which will:

  1. Establish the foundational concepts so you can begin to think in terms of them.
  2. Give you a feel for the idioms: All technologies have their own idioms, and being true to them is the surest way to ensure that you use the technology effectively.
  3. Introduce you to the breath of features the technology has to offer.
  4. Teach you how to use the resources accompanying the technology.
  5. Provide well chosen exercises with which you can get your hands dirty and actually build things.
  6. Keep things short and simple and give you just enough to get started with building your actual product.

I think writing actual code is the most important thing: Practicing with well chosen exercises and actually building something tangible is absolutely the best way to to learn new technologies. There is no good course of study which does not include exercises of this kind.

For instance, when I learnt Rails a couple of months ago, I used the excellent book Agile Web Development With Rails .

This book had everything on my list. It introduced the right concepts at the right time, included exercises with which to test your understanding of the concepts, introduced 'best practices' (ie. the idioms) where appropriate, and actually had you build a complete app as you wound your way through the book.

Using the book I was able to go from knowing nothing about Ruby and Rails to delivering the first version of the application in about six weeks or so.

The best first step for learning IOS development

So when I started on IOS development, I looked for a similar book. A book which would be hands on and walk you through the development of real applications while introducing the important concepts, idioms, features, and resources.

Alas, I could not find any such book. Without exception, all books on IOS development are just glorified instruction manuals with incoherent examples, no exercises, and no exposition of concepts or idioms. Honestly, one could just use the excellent Apple Developer Resources and get pretty much the same information.

This was very disconcerting. I feared I would have to hack my way to learning IOS development, much like I hacked my way to learning JavaScript last year. And the results of that exercise were not very pleasant. So I kept digging, and eventually broadened my search beyond books. Were there blogs, videos, etc. that might help?

It was then that I stumbled on the excellent Stanford CS193P course on IOS development. This is a totally free set of lectures on iTunesU along with all the lecture notes, exercises, etc.. The instructor, Paul Hegarty, oozes experience with Apple technologies and shares a lot of that golden experience in the lectures. Kudos to Stanford for being so generous!

I watched most of the Stanford lectures, did all the homework exercises, and within ten days I had actually built around five apps. At the end of it, I knew the development and testing environment, had crossed most of the basic stumbling blocks, and had learnt how to use the documentation and online resources.

It was a great way to get a footing with iPhone development. I could actually begin to think about how to design and build the RecordBox app, and could make educated decisions about how to start.

And after all, that is ultimately what you need: to be able to make a confident start with your product having understood the major resources available to you and with a feel for the major unanswered questions ahead of you.

Coupling iPhone and Rails apps

One of the biggest unanswered questions was: how do I interface my existing Rails app with the iPhone? This is a very common use-case, and I hoped to be able to adopt existing solutions to this problem.

While hunting around, I found an excellent Objective-C framework called RestKit. It hides most of drudgery of interfacing IOS apps with Rails, thus allowing you to focus on the important things. Plus, it was really easy to get started with it since there are tonnes of examples and a vibrant community online.

In short, It seemed to be exactly what I needed! So I spent some time learning it and thinking of how to design my app to use it.

Purring along

And just like that, in a few short weeks, I went from know nothing about iPhone development to designing and building a RecordBox app which is going start getting real world use very soon.

There are several people for whom the app is a precondition to using RecordBox and so it is going to get its fair share of scrutiny. That will be the real test, but this foundation has given me some confidence that I am up for it.

Thats all I had to say! If you read this article and found it useful in making a start with a new technology, I would love to hear of it. Thank you for reading!