Home > Blog > How to start, build, launch and market your first iPhone App in 28 days – Part 2 (The Prep)

The “How to start, build, launch and market your first iPhone App in 28 days” series so far:

Part 2: The Prep

Ok, so now that you’ve got all the paper work done (which you can do in a few hours) and you’ll be waiting for Apple to approve your Developer Program application, it’s time to start learning Objective-C and all things iPhone SDK.  But first, what do you need to buy?

Read on…

Shopping List

It might seem obvious to most people, but a common starter question is – do I need a Mac?  Yes, in fact, you do.  You cannot build an iPhone App on anything except an Intel-based Mac (or Hackintosh). This is essential and unavoidable.  And technically, that’s all you are REQUIRED to have to build your first app.

Do you NEED an iPhone or an iPod touch? Well, I would definitely recommend it because you want to test it out on the device before you actually submit it, but technically, no, you don’t need to it build your app and submit it to Apple.  The iPhone SDK comes with an iPhone simulator that you can build, run and test your apps on.  There are a few limitations with it (no accelerometer, no camera, etc.) but if your first App doesn’t make use of these and you are strapped for cash, you can get away without buying one.

However, I still recommend picking up at least an iPod Touch so that you can actually test your App on a real device before you publish it.  Clicking a mouse to simulate touch and tap commands won’t give you the real ‘feel’ of your app.  It’s your first app so make a good impression.  The last thing you want is bad reviews because you never actually tried  your app on a real iPhone or iPod Touch.

Another question I hear is, how powerful of a Mac do I need to get? Really, ANY Intel-based Mac will do – even the Mac Mini.  The entire line of Intel-based Macs are certainly powerful enough to build and run iPhone Apps on. Heck, when I started, I was coding on a Dell Mini 9 Hackintosh and that was MOSTLY adequate (I wouldn’t recommend the Dell Mini 9 Hackintosh though because of the low resolution and sometimes I’d get very frustrating keyboard lag when coding in XCode).

I’m coding right now on the lowest end, unibody Macbook and it’s more than enough power.  I also have an external monitor that I hook it up to, but sometimes I code in bed so I have to live with the 1280×800 resolution which is fine because the iPhone simulator pretty much JUST fits vertically at that res.  Only drawback is I cheaped out on the illuminated keyboard option and I regret it now because I can’t see my keys in the dark. :P

If you really are desperate to save a few bucks, check out the Refurbished Macs. Apple has a very high standard of quality and my refurb’d Macbook looked brand new when I got it and I’ve yet to have any issues with it.

Learning Objective-C and the iPhone SDK

So you’ve got your shiny new Mac (or your old one you’ve always had) and want to know, what’s the quickest and best way to learn? Fortunately, the best way is easily done through reading 2 books.  The order in which you should read them depends solely on your programming experience.

Programming in Objective-C 2.0

Programming in Objective-C 2.0

Programming Newbies: Programming in Objective-C 2.0 by Stephen Kochan

If you have done little to no programming and don’t know C, C++, Java or any other programming language, then this book is for you.  You should read this cover-to-cover and go through all the examples.  As a new programmer, you’re going to have to put in extra effort and time to grasp core programming concepts before you can move onto the iPhone SDK.  However, going through this book should get you a good start.  After you’re done this book, you should be able to grasp the next book with ease.


Beginning iPhone Development

Beginning iPhone Development

Experienced Programmers New to Objective-C: Beginning iPhone Development by Dave Mark , Jeff LaMarche

This book is widely known as the Bible for starting with the iPhone SDK. It doesn’t assume familiarity with Objective-C, but it does assume experience with some C variant (C, C++, Java) and prior programming experience (OOP).  If you’re an accomplished programmer in a similar language, you should go through THIS book first and just get Programming in Objective-C 2.0 as your reference book.

Beginning iPhone Development is a great starter book and will teach you almost all the basics of most of the iPhone OS 2.0 API’s.  I write this just as the iPhone OS 3.0 SDK is being released which introduces 1000 new API’s and unfortunately, no book has covered those yet, but I’m sure someone will come out with something soon.  In the meantime though, buy this book, read every page and every example and you’ll come out knowing almost everything you need to get you started.

TIP:
One thing I should mention, but haven’t yet, is that I believe what’s very important in this learning process is that you should ALREADY have an idea of the app that you want to build.  You should have in your head, what kind of app you are dreaming of and how it should look and function.  This is important because it will motivate your learning by allowing you to visualize your app in the context of these lessons.  You will seriously pay more attention to the chapters and lessons that apply directly to the app in your vision. I can’t stress how important this is because it will really motivate you to learn faster and make everything you learn actually stick.

Stanford U on iTunes

Stanford U on iTunes

CS193P – iPhone Application Programming

So, now that you’ve torn through the book (or both books if you’re a beginner), you should be ready to start building your app.  But that doesn’t mean you’re finished learning! While the books provide a great starting point and may be enough to get you started on your app, I recommend that WHILE you’re building your first app, you should also watch the Stanford iPhone Programming lectures. They are available on iTunes for free and are excellent in providing a greater level of detail than the books.  We found that they complement the basic knowledge that you will have of the iPhone SDK at this point and will just reinforce what you’ve already learned.  I typically went through 1 or 2 lectures a day while developing iHeartRate and was constantly learning new things as well as building upon my existing knowledge.  The lectures really brought it home for me.

Apps are for wussies – I want to build a game!

With both books and the Stanford lectures, you should have a great base upon which to build your App. However, if you’re planning on building a game, you’ve got a bit more learning ahead of you.  UIKit, Core Animation and Quartz Core may be adequate enough for simple graphics and animation but if your game has lots of sprites and animation then you’ll need something more powerful.

OpenGL | ES

Fortunately, iPhone SDK supports OpenGL|ES which is a powerful 3D graphics API (OpenGL|ES is essentially a subset API of OpenGL). Unfortunately, because it’s so powerful, the learning curve is quite steep for OpenGL. Here are two well respected sources to begin your OpenGL training.

NeHe Tutorials

Neon Helium Productions offer a very extensive list of tutorials that will help you get started with OpenGL. While most of the tutorials are geared for OpenGL, they have started to port over their tutorials over to OpenGL|ES. At last count they have 48 tutorials which range from creating a simple polygon all the way to ArcBall Rotation (I don’t even know what that means). In any case, this is a GREAT place to get started.

OpenGL Superbible

This book earns its name as a true SUPER BIBLE. Widely recognized as THE book to get and the definitive reference book for OpenGL, this 1200 page monster is very dense and doesn’t mince words.  It is NOT OpenGL for Dummies, so be forewarned.  The tutorials are a nice start and this book is a good supplement to that and works well as a reference book.

Cocos2D

Now if the thought of learning OpenGL|ES sounds daunting and you’re really only doing a simple 2D game, then you might want to take a look at the Cocos2D framework.  It is an open source game development framework that has been used by many developers who’ve built successful 2D games with it.  It has a good following and support and is very easy to pickup, compared to OpenGL|ES.

This is too much, how about I just build a web app?

Now this guide is really meant for developers who want to build native iPhone Apps, but if this all feels like too much to learn, then have no fear – there is one more option!  If you’re a web developer and feel more comfortable with HTML, Javascript and CSS, you can still build an iPhone App and release it on the App Store.

1) Build your webapp

You can either build your web app using HTML and Javascript or you can leverage an open source development tool like PhoneGap.  PhoneGap is a tool that lets you build your app using HTML and Javascript and still access the iPhone’s core features as well as allow your app to be cross platform (Blackberry, Android). However, Apple has recently been rejecting some Apps built with PhoneGap for reasons that are unclear.  So, you might be safer to just stick with plain HTML and Javascript

2) Launch your App as a Site Specific Browser (SSB)

So even if your app is just a web app, you can still release it on the App Store as an app that utilizes the built-in Safari browser but only access your web app. This allows your app to APPEAR like a native app but in fact, it’s just a browser that’s point to your iPhone specific web app.  Pete Forde from Unspace gave a great talk about how they did exactly this with the iPhone App they build for The Score and numerous other projects and their users didn’t even know that the app was not built in Objective-C and was, in fact, just a web app wrapped in an SSB. You can find the presentation here: Pete Forde’s Mesh 09 – iPhone Application Development

Start Building

Now hopefully, all that learning only took a week or so. And hopefully, while you spent all that time learning, you thought about your App and how you were going to use everything you were learning to build it and visualized how it would work.  Depending on the complexity of your App, you may need additional resources to help you get through this first build.  Here’s a short list of resources that we used as references while we built iHeartRate.

Additional Resources:

With all these resources at your disposal, you’ve got no more excuses – start building! Now is the point when you’ve really got to just get down and start building your App.  If you went through all the books and tutorials, building a basic prototype should be much easier now and you’ll learn even faster by just experimenting and playing with the SDK.

Next up in the series is The Design – where we talk about how important looks and usability is just as important as functionality.

Updated – Added a link to BIT-101′s great Cocos2d starter tutorial. BIT-101 Blog’s Cocos2d Tutorials