Saturday, July 25, 2009

Chapter 1 - Beginning Your iPhone Programming Today - An Introduction

Welcome to the iPhone Programming world
So, you are going to write iPhone programs? Welcome to the most interesting world of programming. Today, iPhone is one of the most interesting programming platforms. Apple’s iPhone is more than just a new programming platform; it’s an entirely new way to think about mobile technologies.

Here I am going to explain each and every point of iPhone programming. This is my first blog which includes only the basic details of iPhone

This chapter is intended for novice programmers and experienced programmers can skip this chapter.

Things we need before writing iPhone programs

Before writing iPhone programs you need to setup the following things
  1. You need an Intel–based Macintosh running Leopard (MAC OS X 10.5.3 or later).We need to use a Macintosh computer released since 2006. It can be a laptop or desktop. You can buy a Mac Mini or MacBook
  2. You need to sign up with Apple site to become a registered iPhone developer
  3. You need to download and install iPhone SDK from Apple’s site
  4. For distributing application in app store, we need to purchase one of the developer programs. Then apple will send the necessary information to you.
Hardware requirements for iPhone program development

IPhone program development has minimum hardware requirements .Without this requirements, iPhone programming cannot begin. Here we describe essential hardware needed for iPhone development.

Mac machine
We need an Intel-baBoldsed Mac machine or Mac Book because iPhone applications can only be developed using Apple X OS. A non-Intel based Mac machine cannot be used for iPhone application development. We can choose between a Mac Book (or Mac Mini) and a Mac PC. Please make sure that it has at least 2GB RAM for smooth performance
We can use an alternative as a Power PC Mac for iPhone development. But the output will result in extremely low productivity. If you still want to use PowerPC make sure it is running Leopard 10.5.4 or higher

iPhone
Phone applications can be developed using the iPhone Simulator (that comes bundled with the iPhone SDK) or iPhone. But iPhone Simulator does not support system dependent functionalities like GPS functionality or access the internet from within the application. In such cases the iPhone simulator is not enough and you need to buy an iPhone.
Once you have this minimum hardware ready, you can start to write iPhone applications and games.
Signup as a registered iPhone developer

For downloading the iPhone SDK from Apple, we need to register as a registered iPhone developer. Steps involved are
  1. To sign up, please visit http://developer.apple.com/iphone
    This will show a page similar to the one shown below (Here I am using Internet explorer as browser from Windows. You can choose to use Apple Safari as browser from MAC

  2. Then click on the Register link at the top right (marked with red circle). This bring up a page similar to shown below

  3. Then click on the continue button (marked in red circle). Then we will get the following page

  4. Select the first option (Create an Apple ID) and click continue.


  5. Enter Apple ID and other account information in this page and click continue. Next page is

  6. Select your options and click Continue. Then you will get the screen

  7. Here you need accept the iPhone Developer Agreement and click I Agree.

  8. Then Apple will send a verification code to your email id. You need to copy the verification code from email and paste that code to the edit box in the following screen and click Continue

  9. If the verification code is correct, you will become a registered iPhone developer
  10. Then you can download lots of tools from apple site including iPhone SDK
Downloading iPhone SDK
To download iPhone SDK from Apple site, we need to get valid Apple ID. Once you register with Apple, follow the steps given below

  1. Visit the site http://developer.apple.com/iphone and click iPhone SDK link (as shown in the figure in red circle)

  2. Then you will get the following page
  3. Click the Downloads link

  4. This will download iPhone SDK installation to our machine
  5. We can also download documentation, video, sample codes, etc. from this site.

    We will explain more about iPhone SDK and its installation in my next tutorial (in Chapter 2).

Distributing application in app store

We can not distribute our application to apple store without the permission from Apple. If you plan on releasing your masterpiece at any point, you'll need to sign up with the iPhone Developer Program. There are two types of programs are available.

  1. Standard program - The cost is $99, and it involves agreeing to Apple's terms and conditions, and signing and returning the contract. If you complete the project, you will need to sign up in order to test your code on an actual iPhone rather than iPhone simulator. Once you are on the Developer Program you are sent a certficate, which allows you to pair up with an iPhone device. It provides development tools, resources, technical support, and distribution of our application via App Store, the ability to test and debug our code on iPhone.
  2. Enterprise program – The cost is $299. It is for companies developing proprietary in-house application for iPhone/iPod

    We will discuss more about these in the coming chapters

1 comment: