5 Steps for Getting Started with iPhone Programming

Aug 08 2009

xcode

Today I uploaded my first iPhone application to the app store!

I’m going to cross my fingers and hopefully in 2 weeks or less, I’ll see my app sitting pretty in the store. Now I can finally catch my breath, and talk about my experience with iPhone programming.

Let me start out by saying it has been a LOT of fun programming on the Mac. It’s hard to say exactly why, but part of the reason is because it is so different from programming on the PC, and it forced me to think different (hmm….someone should trademark that phrase ;)

The IDE is totally different; The programming language was totally different; And, of course, the platform itself is totally different. It was similar to the feeling I got when first learning .NET coming from C and classic VB. There’s a joy in stretching yourself and just diving in.

A lot of other .NET programmers have been asking me what it takes to get started iPhone programming on a Mac, so I thought I’d share the basic steps that I went through:

  1. Get a Mac: With some minor exceptions, you have to have a Mac to code for the iPhone, and it’s a good opportunity to see how the other half lives. I found OS X to be a joy to learn and play with. For those of you switching from windows for the first time, I recommend getting a Mac mini because it makes it easy to inexpensively dip your toes in the Mac world. You can leverage existing monitors, keyboards and mice. Also, it’s perfectly capable for iPhone programming.
  2. Download the iPhone SDK: After getting your shiny new Mac, head out to the apple developer site and download the iPhone SDK. It’s free and it will give you a copy of Xcode (the standard IDE for Mac programming) as well as the API libraries required to code for the iPhone. Once you have all of this, you can write your first iPhone app and test it on the included simulator which runs on your Mac desktop. There is one big gotcha though. If you want to test it on your own phone, you have to pony up $99 and join the apple developer program. Once you do that you get the option to deploy to physical devices.
  3. Learn the Objective-C: Objective-C is Apple’s language of choice for iPhone programming. Apparently it has a long history in the Mac world, but it was totally new to me. I had done C++ programming professionally and it is similar, but there are enough differences that I still had to crack open some books and watch some videos to educate myself. I mainly used Beginning iPhone Development Exploring the iPhone SDK by Mark and LaMarche as well as the free Stanford iPhone Programming videos on iTunes U. Both are excellent.
  4. Learn Xcode: If you are doing iPhone programming, you are going to be spending a lot of time in Xcode. And if you are coming from VS.NET (as I was) it will definitely take some getting used to. While many of the ideas are similar they are implemented in radically different ways. For example, Xcode has a designer surface similar to the designer in VS.NET but in the Mac world it’s a totally separate program called Interface Builder. And you don’t hook up an event handler by double-clicking on a button. Instead you control click and visually drag a line to the event handler. In learning Xcode, I found the pragmatic programmer’s video tutorial to be essential. It was easily worth the $5 because in a short amount of time they illustrated how to move around Xcode with ease.
  5. Find a Project: I’ve always believed that the best way to learn something (especially programming topics), is to jump in with a real-world project. For me, that meant building an app that I would find useful for the iPhone. This would give me the motivation to actually do the iPhone programming and not feel like it was a waste of precious time. I chose to build an app for the cub scout community (which my son is a part of) to help parents track their kid’s progress toward badges. I would recommend that everyone find a similar project to stay motivated.

Hope this helps others who are looking at getting started with iPhone programming, and I’d love to hear about other’s experiences trying out iPhone programming.

View Comments

  • http://www.alynauman.com Aly B

    I am using vm on my dell 5100 to run mac. It is not that fast. I may just buy Mac Mini. I downloaded some videos for iphone development. I haven’t tried XCode yet but I heard it is pretty good. What did you build?

  • Bryant

    I built a little app for the cub scout community to track advancement toward badges. It was an app that I had wished was out there so I just decided to build it myself

    I’m considering going the other way than you by buying a mac book pro for my main laptop. Then I’ll run windows in VM ware fusion. We’ll see…

  • Peter Walke

    Another great resource to specific questions about iPhone development has been StackOverflow. I had a question about what the c# equivalent HttpRequest and HtttpResponse objects were, and found answers to this and other questions pretty easily there.

  • Bryant

    Hey Peter – Totally agree! SO is a great resource. I got lots of answers there while building my app. I love their tech podcast as well.

  • http://fuzzycouch.com Guido

    I’d like to see your scout app when it gets approved. Let me know how to find it?

  • Bryant

    Will do. Should hopefully be approved by apple in the next couple weeks. The companion website is bragvest.com

blog comments powered by Disqus