iPhone App Development – Where to Start

iPhone App Development - Harder Than You'd Think

[October 4, 2012 Update]

On September 27, 2012, Apple accepted my first app, Fine Tip – Tip Calculator (buy it here, read about it here) into the app store. For reasons I won’t get into, I abandoned iPhone app development back in the fall of 2009. In August 2012, I took up the torch again. Within one month I was able to complete my first app.

Much has changed in three years. While most of what I wrote below still stands, ignore the book recommendations below. Instead, I strongly urge you to buy the two books below. Had they existed three years ago, I would have been able to develop my first app much quicker. I purchased them in August 2012 and had my first app done in less than a month:

[End October 4, 2012 Update]

[Original Post Last Updated: April 2009]

How hard could it be, I asked myself. I’ve developed my own applications in Basic and C. I can configure an Apache Server, install and use PHP, MySQL and other server apps. I develop and maintain websites and blogs from my home server. Over the last 15 years I’ve taught myself HTML, PHP, MySQL, CSS and the basics of Java. How hard could it be to develop a small application for the iPhone?

Let’s step back for a moment.

I have a very particular program in mind that I’ve wanted for years. It’s a very simple program – perfect for the iPhone (more on that in future posts). I could whip it up in C or PHP in about a day. I’ve never owned, or even used, an Apple computer of any kind in my some 27ish years of computing. I regard the iPhone App Store as a revolutionary new idea that pries control of mobile device apps from the big-bad telco giants and puts it in the hands of average consumers and developers — where it belongs. I see cloud computing as a very important part of our collective computing future. I want to get in on the ground floor. If my first simple program works out, I want to develop an iPhone app to work with my wishhh.com service. After that, who knows.

So, in August 2008 I registered to to join Apple’s standard developer programpurchased a Mac Mini (subsequently replaced it with an iMac) and set out to develop my first portable application for use on the iPhone.

Minimum Hardware

To develop for the iPhone you will need an Intel-based Mac running Leopard (OS X 10.5.3 or later). Any Mac released since 2006, laptop or desktop, should work.

Piece of Cake for Mac Cocoa Developers

If you have a solid grounding in Cocoa development (Apple’s Objective-C framework) with the xCode development on the Mac platform, developing iPhone Apps should be a breeze. Not so much for the rest of us.

Learning Curve for the Rest of Us

Below is a discussion of the  hurdles I have had to overcome and the online resources I’ve found useful in my bid to become the newest iPhone App developer:

  • Learning to Use the Mac and Leopard: Admittedly this will not be a hurdle for most iPhone App developers. It was for me. I have never used an Apple computer of any kind for more than a few minutes – ever! While I can appreciate the elegance and *cough* ease of use *cough* so often spoken about in the Mac/Leopard OS X world, just using the platform can be an enormously frustrating experience for a died-in-the-wool Windows user (the universal menu-bar makes me want to pull my hair out). But, I’m over that hump and moving forward.
  • Downloading and Installing the iPhone App SDK: Everything you need to build an iPhone App is contained in the huge iPhone App SDK. Like everything else on the Mac, installing it as my first Mac App was a bit of a challenge. I had never heard of .dmg files, let alone used one, to download and install Mac apps. With the help of this Mac 101: DMG files are Disk Images explanation, that challenge was soon overcome.
  • Object Oriented Programming, Objective C and Cocoa Touch: For 15 years I have been steadfastly opposed to learning object oriented programming ("OOP"). I didn’t need no C++. C was good enough for me. For small developers of small applications, I’ve never seen the benefit of inheritance, polymorphism and encapsulation – I still don’t (though I can see it being incredibly useful for developing large apps with large development teams). But for iPhone App development I didn’t have a choice. The only language available to develop iPhone apps is Objective-C, as the name implies, an object, oriented superset of the C programming language. Apple’s proprietary variant of Objective-C framework is called Cocoa. The specific part of the framework used for iPhone app development is called Cocoa Touch

iPhone App Development - Oh My Gosh

  • Crash Coarse in OOP, Objective C and Cocoa: Much of my time in the first few weeks of my quest was spent learning the basics of object oriented programming and Objective-C, and Apple’s proprietary Cocoa. While the other hurdles mentioned in this post are challenging, learning the basics of Objective-C and implementing them a real-world program with Apple’s Cocoa, was, my biggest challenge. Aaron Hillegass’ text (see below), discovered 3 months after I started all this, was instrumental in my overcoming my Objective-C hurdles. With that text under my belt, I began to make significant progress.
  • iPhone Development / Tutorial Books: In the initial days, iPhone developers were islands unto themselves. There was very little support anywhere, whether online tutorials, forums, texts etc. because Apple imposed a gag-order in the form of an NDA on all developers.  Apple lifted its NDA restrictions on October 1, 2008. As a result, there are now a plethora of iPhone application development books coming out – See here on Amazon.com for example. The first book below is not, however, iPhone specific, but was critically important for me to read before I was able to progress through the next two.
    • Cocoa Programming for the Max OS X (by Aaron Hillegass) – This book was recommended to me at the Toronto iPhone Developers conference on December 4, 2008 by an Apple employee as a good Objective-C Primer. It is terrific. It’s EXACTLY what I needed. It filled in most of the blanks I was missing.  If you understand regular C, but are new to Objective-C – START HERE! You will NOT regret making this purchase. Reading and practicing on the iMac with the example programs contained in the first 8 or so chapters gave me the Objective-C grounding I needed to move forward to the books mentioned below. As of Dec 16, 2008, I believe I have a solid enough grounding to move on to the other two books.

      Project files/code listings from this book (for basic Mac apps) can be found here (under the ‘Get the solutions’) heading. The book’s forum/errata list, such as it is, is here.

    • Beginning iPhone Development (by Dave Mark and Jeff LaMarche) -As of December 16, 2008, I just started getting into this one. It’s looking good so far. I’ll update this section as I make progress.

      Demo iPhone apps project files that correspond to the chapters of the book can be found here. The book’s user forum is here.

    • The iPhone Developers Cookbook (by Erica Sadun) – This text  was the first to arrive on November 13, 2008.  On November 16, 2008, after getting a couple chapters in, I stopped and sought out the Aaron Hillegass text above. This book is quite good but assumes a solid grounding in Cocoa/Objective-C, which I did not have at that time. I’ll come back to it at a later point. 

      All project files/code listings/objects from all projects in the book can be found here. Her EricaSadun.com website provides a forum for readers to discuss the text and ask questions.

  • Useful iPhone Dev Center Getting Started Documents: The iPhone Development Center website (free to anyone that registers – register here) contains a plethora of videos, tutorials, information, sample code, how-to’s etc. Much of it useful. Much of it not (especially for newbs like me). I strongly recommend the texts listed above. Once you have a grounding in the basics, the official Apple documents become much more useful. The most useful documents/tutorials I’ve found in the walled-garden iPhone Dev Center when I was starting out were:
    • Object-Oriented Programming with Objective-C: Thank goodness for this document. After a few days I was almost ready to give up until I found this guide. It is written for someone who understand C and needs a primer on object oriented programming. This article explained OOP to me in a way that finally made sense to me. The light-bulb went off when I read the analogy between objects to C structures. If you understand C but not object oriented programming, this document can help you over the hump.
    • Introduction to Cocoa Application Tutorial: The next most critical piece to my learning was this Cocoa tutorial. I had initially jumped straight to the various iPhone templates, sample code and tutorials but found myself a bit baffled by them. They all assume a base level understanding of Cocoa, xCode (see below) and Interface Builder (also see below) that I just didn’t have. I decided to first step back and use this tutorial to learn how to build a Mac App using the SDK tools before ploughing ahead with my first test iPhone Apps. It was worth it. In fact, I’ve gone through that tutorial twice. It nicely walks you through the MVC (model, view, controller) design paradigm assumed in all the other iPhone App documentation (see also MVC on Wikipedia), and holds your hand, step by step, through the process of designing and coding your first Cocoa application. Invaluable!
    • Learning Objective-C: A Primer: I had read this document at the very beginning of my learning process and was somewhat flummoxed by it. Coming back to it again after digesting the OOP with Objective C document and the Cocoa tutorial (each above), it made so much more sense and is a ultimately a terrific primer once you have a little learning under your belt.
  • Useful External Documents/Sites: Outside of the iPhone Dev Center, I found the following useful:
    • CocoaDev: A fantastic wiki site for MAC OS X Cocoa developers.
    • From C++ to Objective C: [pdf] While I never learned C++, as a C programmer this document at least spoke my language and helped me translate much of what I learned in the world of C to the world of Objective-C.
    • Objective-C Resource Center: This site contains links to useful Objective C FAQs, tutorials, etc. However, these are of limited use since they all pertain to generic Objective-C and not to Apple’s proprietary version of Objective-C framework, namely Cocoa.

xCode

  • xCode: To apply all the Objective C and Cocoa goodness I’ve been learning, Apple provides a fantastic development tool – xCode. xCode is a multi-facetted development tool used to develop both Mac and iPhone applications. I’ve used a dozen or so application development frameworks over the last 25 years and xCode is hands down the best. If there is anything that will delight you in the iPhone App development process its xCode. It just does what you want a development environment to do. So many of the menial tasks of the past are handled effortlessly for you. I am continually delighted as I use this tool with its deep feature set. Wonderful!  For details see the xCode Workspace Guide.

iPhone xCode Interface Builder

  • Interface Builder: Interface Builder (pictured above) is the part of xCode that you use to develop the visual/graphical interface to iPhone Apps – what you see and manipulate on the iPhone as you use iPhone Apps. It took me awhile to figure this beast out.  The video version of the ‘Cocoa is my Girlfriend’ tutorial below was helpful as was this part of the more generic Intro to Cocoa Application Tutorial. I’ve quite a bit to learn yet to feel proficient at integrating the fruits of this tool with the underlying code in my application. But this too will come. The Interface Builder user guide is here (again, available only to those who have registered).

iPhone simulator

  • iPhone Simulator: One of the last pieces of the iPhone App development puzzle (before you start testing on an actual device that is) is the iPhone Simulator (pictured above). At any time during the development process you can build and test a version of your iPhone App and run it in the iPhone Simulator. It’s pretty nifty and easy to use.
  • Online Tutorials: There are several online tutorials that hold your hand, step by step, through basic iPhone application development:
    • Your First iPhone Application (Apple’s introductory tutorial). This includes a terrific step-by-step description of the basic bootstrap process. I wish I had read this one a lot earlier than I did. It answered a lot of my initial “what the?” questions. Note: You will need to be logged into the iPhone Development Center to access this.
    • icodeblog Tutorials: A computer science student named Brandon at the University of New Mexico has been posting useful iPhone App development tutorials on his icodeblog blog. His forum allows would-be iPhone developers to discuss his tutorials and learn from each other. His tutorials have been invaluable to my learning process.
    • Cocoa Touch Tutorial: iPhone Application Example – [video version] (Cocoa is my Girlfriend);
  • Other Online Resources:
  • SQLite Manager Firefox Add-on: Not all iPhone Apps require/use databases. My first simple application does. The iPhone SDK contains, and the iPhone uses, SQLite to handle your iPhone App database needs. If you use Firefox, I  recommend this SQLite Manager add-on to create, modify, populate and manage the database tables your iPhone application will need. It is much easier than working with databases via the Mac command line interface. Save the resultant tables in your xCode project directory and, voila, they are available to your iPhone App.
  • Testing Apps on iPod Touches or iPhones: I have yet to completely unravel all the mysteries of testing  iPhone Apps on my personal iPhone, becoming a certified iPhone Developer, let alone submitting an app for approval and inclusion on the App Store. At a minimum you’ll need to join the “iPhone Developer Program” ($99 for most of us). Paying your $99 does not mean you’ll be automatically approved to distribute your app through the App Store. Frankly, I’m not ready yet anyway. But it will let you test your apps on your iPod Touch/iPhone and allow you to distribute it to up to 100 friends to test as well. The process is described in detail in the Erica Sudan text (see above) and also in this online description:

    When my simulator testing is done I’ll venture down that path and update this post accordingly.

I’ll continue to update this post (or write new ones) from time to time if/when I find more useful iPhone App development resources, blogs, forums and as I learn more about the developer certification and App Store submission process.

I’d appreciate any useful resource suggestions that other iPhone App developers can make in the comments below. In particular, if there are other blogs/tutorials out there like the icodeblog, I’d really like to hear about them.

Comments

comments

82 Replies to “iPhone App Development – Where to Start”

  1. Thanks AM – it keeps going in fits and starts. Things work for awhile and then I'm up against a wall again. I'm up to chapter 9 of the Mark/LaMarch text, understanding everything to that point but scratching my head again. I guess I need to keep practising.

    I have a method that 'works' for my basic underlying structure but I'm not happy with it. I have the basic layout of my app working. I'm still stuck on how to get an IBAction from one view-controller, to activate a method in another view controller. If I could solve that riddle, things would be moving along faster.

    😉 …Dale

  2. hiiii.i am sapna studyiny in fourth year computer engineering.i have to develop a project in i-phone using linux.is it ok if we use linux or windows.if we use linux what tools will be required?can we use objective -c ? i just read about eclipse i-phone cdt.i am totlally confused.can you please help me?

  3. As far as I know, the only way to develop on Linux or Windows is to develop fro jail-broken iPhones only. I do not know what tools are involved. But there are dozens of websites out there that can help. Sorry.

  4. Great article Dale, very informative stuff and a great overview of SDK/app development.

  5. We also wanted to mention our site. If you are looking for an iPhone app developer to advance you application idea, or are an experienced and talented application developer, you want to check out this great new resource.

    http://www.iPhoneAppFreelancer.com

  6. Thanks very much for your Article. I am totally new to Mac and iPhone development. Your hard work of researching has been an amazing insight for me!

  7. Dale,

    Just found your blog on the 100bestuniversities.com site and will follow you on twitter. Just wanted to recommend 71squared.com. Michael Daley does a series of excellent video tutorials on game building. Thanks for plotting your course. I am new to iPhone programming and waiting for the light to flick on. Perhaps following your references, it will sooner….Mark

  8. Thanks so much for putting this post together Dale.
    I was recently made redundant after 15 years at the same IT company and I decided it was a perfect opportunity to try some iPhone development while I look for a new job.
    Your post has saved me hours of searching for the information I need to get started.
    I have purchased a macBook and the two main books you recommend and am about to try and get a 'hello world' application across onto my iPhone (having subscribed to the developer programme).
    I am experiencing some of the same frustrations as you as I come from a Windows and C/Visual Basic background. I have to say I kinda like OSX it just takes some getting used to, especially the keyboard shortcuts like you say.

  9. Hi Dale,

    How far into the development of your app are you? What are your experiences so far? What else can you share with us?

    I am also getting interested in developing apps for the iPhone. I have programmed in PHP, C, and some Java. I know HTML, Korn/Bash shell scripting (I come from the UNIX/Linux side), MySQL and some Perl.

    I have never owned a Mac before, though I have used one briefly and really liked the interface. I've been wanting to purchase one for a couple of years now and this could be the perfect excuse to finally do so.

    Thanks for your article!

  10. My experiences are no more than what I've written above and in the comments. My development is on again, off again. I finally got past the hurdle that was holding me back in August and then life interviewed. My law practice has gotten quite busy and I haven't had the time to get back to it. I hope to finish it one day, but you never know … best laid plans and all. 🙂

  11. Dale,

    I certainly appreciate you putting so much time into this article. I just bookmarked this page as I am taking on some iPhone App projects and am a newbie. In case someone reading your article isn't even familiar with C (which I believe is a very SOLID foundation for Obj C programming and makes the Obj C programmer that much stronger), Harvard offers a free C course that is exceptional at http://www.cs50.tv The instructor is excellent and all of the source code and notes for the course are also available online.

    Thanks again, Dale.

    Justin

  12. Great resource.
    For those who don't have the knowledge to dive into xcode but still want to show what their app idea would look like, I recommend using MockApp.
    It lets you build prototypes / mockups using Keynote or PowerPoint and virtually all iPhone UI elements are there in vector format, ready to be copied and pasted into an iPhone template. It's a great way to show your idea in high-fidelity to others or to provide detailed specifications to developers.
    It's a free download at http://mockapp.com/download

  13. Sapna, the 'Beginning iPhone Development' textbook I mentioned above should cover the bases for what you need to know. Of course the Hillgas 'Cocoa Programming for the Max OS X ' text will be critical if you are new to Objective C, xCode and programming for the Mac generally.

    You could, of course, do most of what you want by developing a web-app applicable for a mobile device, but to get the unit iPhone touch features and advanced graphics on the iPhone you'll want/need to build a native iPhone app.

    …Dale

  14. Actually, There is a new e-book out that has really helped me. Here is the link if anyone is interested http://tinyurl.com/yga6are Oh! and by the way, I have been using a Mac for about 2 years, and It was really hard for me to understand xcode. I just couldnt grasp the dragging objects to the code and such. ugh confuses me right now:p

  15. I'm not sure what you mean. Do you mean you want to pitch to someone to get funding or do you want to find someone that you will fund to develop your app.

    I don't know of any seed or venture fund that is accepting iPhone app pitches. The market for any such app would be too small for them. If you are looking for someone to develop your app, check out the comment by iPhoneAppFreelancer above. They seem to be open to doing that.

    …Dale

  16. Dale,

    I am considering jumping into the iPhone App frenzy, and am curious what your status is after 1 year of effort. Did you ever get an app accepted into the store? I will put in the work necessary to succeed, but I want to be reasonably confident that hard work and persistence has a reasonable chance to generate a profit. What are your thoughts?

    Very useful blog. Thanks for putting this together.

    One more thing. Have you noticed that it appears Indian students are given an assignment to generate an app, with almost no guidance or grounding? This is the type of hard core, open-ended assignment that would be good for American students to do.

    -Jim

  17. Hi Jim:

    I started back in August of 08. Worked at it until November of 08. Then life got in the way and I stopped until spring of 09, went at it hard again for a couple months and then life got in the way again. I have not gone back. I have not completed my app and I never submitted it to the app store.

    What I did get to was a place where I had everything figured out enough that I knew I could pull it off. I have a very specific, non-standard user interface in mind that I want to use and it took me 50% of all my time to finally get to the point where I knew I could pull of my interface. I had the interface running and was about to build the underlying app and database.

    If I ever get back to it, it won't be until fall of 2010. At this point I'm interested in developing it for the Android platform too. Maybe I'll go that way first. But, life and my law practice are keeping me too busy to complete the project now. I'm disappointed in myself that I haven't finished it. But, I know, given time, I could and that makes me feel good.

    As for Indian vs. American students, I now for a fact that there are North American universities that have iPhone app courses and the course-long project IS to build a working app. So we got that go'in on here too. If I see a reference to those courses in the future, I'll add a link back in here.

    Good luck.

    …Dale

  18. Please reply here if you find a developer. Once a month or so I have people email me looking for credible iPhone app developers to help them develop their app idea.

  19. I am a PC guy. I understand the Mac world only enough to get where I have in this post. You'll have to go to the SDK download page and see what the minimum hardware requirments are and see if your current laptop can support it. I believe the minimum requirement is OS related and the question is whether older Mac hardware can run that OS. But I really don't know the details. Sorry.

  20. I don't know how to program, but I've written lots of tech documentation. I have 3 iPhone App ideas that have an immediate market.

    I was just about to become a developer, but I really don't want to go that route. I speak with programmers very well. Actually, sometimes, I come up with solutions that programmers don't see, cuz I'm always looking to increase efficiency, to do things a smart or easy way, to figure out non-complicated ways to do “complicated” things, and, this is a biggie, figure out how to do something “another way” that does not require a year of coding, but simply requires reframing the user experience and procedures a bit.

    What I'd like to do is find experienced, super-smart programmers (one or more), who can do sh*t quickly and well. I would like to have a confidential conversation with interested programmers who would like to profit share on my application.

    I don't want to pay up front (though we can talk about it) and I'd like to build in profit sharing for the “team feeling.”

    You would need to agree to a non-disclosure and non-idea stealing agreement b4 I disclose the idea to you, and when you see the market, you'll know this is a winner.

    …this might be more for students, I'm not sure.

    If you need a project with an immediate commercial market, contact me.

    Sincerely,
    Dainis

  21. Please come back and let us know if you find any developers willing to work that way. I get this question all the time: Do you know a developer that can build an app for me? If there are developers out there interested in working with others that want to pay you to develop or do some kind of profit sharing arrangement, please leave a comment here because there are lots of people looking for flexible developers to build their app ideas.

    …Dale

  22. Umm … this whole post was about 'where to start'. Beyond that, I don't have many more idea. I'm glad to see you are passionate and want to build new apps. You'll need an aptitude for programming. If you don't you'll need to find someone who is, that is willing to do it.

    …Dale

  23. Dale, thank you for this useful, entertaining, and brass-tacks write-up. I've been a programmer in the windows world many years and one hand keep drifting to mac, waiting for the other to follow. Your story is going to help me. On another note, the website link I'm putting here is for a great children's book I wrote and illustrated and I'd like to share with you as friends in self-expression. Give it a quick viewing. Buy 10,000!

  24. Thank you for that great post. I will start developing for iPhone but before i need a mac. I will get it soon. 🙂

    bookmarked

  25. You don’t have to be a programmer if you need iPhone app. As for me – I use snappii dot com web service and make my apps.nI don’t know anything about programming but I can create cool apps because snappii dot com has really good features for this.

  26. Very informative and helpful post Dale. Thanks a lot. I’m a iphone app developer and Objective-C just looks foreign to me. I initially started out in Java but it’s been 3 years or so. Thanks again, I look forward to getting these books.

Comments are closed.