Home » Portal » Getting started with iphone and ios development

Getting started with iphone and ios development

Getting Started with iPhone and iOS Development

Prize winner in Competition “iPhone Development Competition”


This is a first in a series of articles to get some one up and running with iOS development. iOS is the Operating System that runs on the iPhone, iPad, and iPod Touch. While I will use an iPhone for my example code, you could apply the code to all three devices. After you become comfortable with iOS development, take a look at my second article in this series: Introduction to iOS Graphics APIs Part 1 .


To take advantage of this article, you’ll need to already have an understanding of object oriented concepts, and you’ll need to know a C-language (C, C++, C#) and know what is meant when I use terms such as object, class, function, method, variable, and so on. I’m making the assumption that you have never looked at Objective-C. I’ll introduce you to the Objective-C language, and then will walk you through some programming scenarios that I think will best get you started. As things are in any programming environment, there will be more than one way to get a task accomplished, or more than one syntax to express something. Exhaustively presenting all the possible ways that something can be expressed is not reasonably possible. So keep in mind that there are other ways of accomplishing what I explain here.

Selecting Hardware

A minimally sufficient development environment for iOS applications is composed of just an Intel based Mac. Owning an iPhone, iPod, or iPad is optional, but extremely helpful.

If you are looking for the absolute best hardware to use for developing for iOS, it’s easy to say "get the top of the line Power Mac with all the options you can". But for most of us (myself included), there’s going to be a cost constraint when selecting the development hardware that you use. The absolute minimum hardware configuration that you need will be an Intel based Mac running Snow Leopard. The least expensive Mac that you can purchase new is the Mac Mini. Compared to the price of the lowest cost PC that you can purchase, the Mac Mini will look quite pricy. But I’d suggest shelling out a little more money to get a portable computer. With the Mac Mini, you’ll be confined to developing when you are in the room in which it is setup. With one of the Mac Books, you might also find yourself developing when you are relaxing in front of the TV or in some other comfortable spot.

Depending on your needs, if you find that you don’t need the latest version of the iPhone for your intended applications, it’s a good idea to shop around for bargains when Apple is releasing either a new iPhone or new Macs. I was able to acquire an inexpensive iPhone from some one else that was upgrading, and found a Mac Mini on sale from a store that was clearing their shelves for newer units. (I’ve since then moved onto a Mac Book Pro after wanting to be able to develop from other rooms in the house.)

My initial setup was made of an Intel Mac Mini I found on sale and a contract free iPhone I purchased from some one upgrading to the next generation phone

You don’t need to have an iPhone, iPod, or iPad to get started (hereon, I will collectively refer to these devices as iOS devices). The SDK comes with simulators (or emulators if that’s the terminology that you are accustomed to). But the simulators have limitations; you’ll find that you’ll want to have real hardware when you are developing anything that uses an accelerometer.

If you plan to use real hardware for your testing, it’s not sufficient to have just the needed hardware and software. You will also need to have a subscription to Apple’s iPhone Development Program (cost about 99 USD per year).

Do I Need to have a Macintosh?

I get a lot of traffic to my personal web site because of a service I reviewed that was designed to allow those without a Mac to do iPhone development. I don’t want to go into a discussion of the service here, so I’ll just tell you yes, it is mandatory that you have a Macintosh. The only sanctioned hardware for iPhone development is an Intel based Macintosh. Don’t waste your time trying to circumvent this.

Installing the SDK

developer.apple.com. You’ll see a link to the iPhone dev center. Clicking on it will take you to the page for the SDK download. Apple sometimes has beta versions of the SDK available for download. But unlike the current version of the SDK, the beta versions are not available for all to download. You must be a registered developer with a subscription to have access to them.

The DMG for the SDK will download and automatically mount. Run the installation, and after it finishes, you’ll be ready to get stated with development.

Getting Started with Objective-C

Programs created for the iPhone are written in Objective-C. Objective-C is often described as a strict superset of the C language. Others call it C with object oriented concepts applied. The first time I saw it, I have to say I felt like I had no idea what I was looking at. It doesn’t look like any other programming language that I know. But after you get through your first few programs, you’ll find it to be much easier to follow. Being a strict superset of C, if you already have algorithms that are written in C, you should be able to port them over to the iPhone. The following chart shows some expressions that mean close to the same thing in C and Objective-C:

Check out this article