Before starting our iPhone Programming Journey we must focus on the following:
- Objective C
- Cocoa Touch Framework
- iPhone SDK
- iPhone APIs
Objective C is the programming language used to develop programs for the iPhone. Currently it is primarily used in the Mac OS X as a desktop language and also on the iPhone OS. The iPhone uses the iOS Operating System. If you develop programs for the Mac you already know objective C. It is based on the C Programming Language with object-oriented improvements and a distant cousin of C++.
Objective-C is defined as a small powerful language and it is a standard set of the ANSI C language. It is mostly based on Smalltalk, one of the first object-oriented programming languages. Objective-C is basically designed to give C full object-oriented programming capabilities and it uses OOP's features like Encapsulation, Polymorphism, Inheritance etc.
It is developed by Brand Cox and Tom Love for their company StepStone in the early 1980's. Objective C is a simple and very intuitive programming language that makes Object Oriented Programming simple and sophisticated. Now it has become popular once again as it is being used by Apple to develop applications for the Mac system and iPhone.
Cocoa Touch Framework
Cocoa Touch is a UI framework for building software programs to run on the iPhone, iPod Touch, and iPad. Cocoa touch is Apple's name for the collection of frameworks, APIs, and
accompanying runtimes that make up the development layer of the iPhone OS. Cocoa is implemented in Objective-C, an object-oriented language that is compiled to run at incredible speed and it uniquely flexible. Because Objective-C is a superset of C, it is easy to mix C and even C++ into your Cocoa applications.
Cocoa uses the Model-View-Controller (MVC) design pattern throughout. Models encapsulate application data, Views display and edit that data, and Controllers mediate the logic between the two. By developing with the Cocoa touch frameworks you will be writing applications the same way that the iPhone OS itself is written, with controlled access to the
operating system. You need to learn various aspects of the touch framework to master the iPhone programming. In this UIkit provides the basic tools you need to implement graphical, event-driven applications in iOS.
The iOS Software Development Kit (SDK) is used in the iPhone. It is a software development kit developed by Apple and released in February 2008 to develop native applications for iOS.
If we want to setup our coding environment on our computer. we need to download and install the iPhone SDK on our Mac or the Virtual OS on our Windows PC. The iPhone SDK consists primarily of Xcode integrated with Interface Builder. It has supported iPhone and iPod programming. Xcode is an all-season complete SDK for building MAC and iPhone/iPad software.
There are many things which the Xcode interface will do for you like auto completion of the syntax, memory management and signing your app for running on the real device.
API stands for Application Programming Interface, It is a set of procedures, functions, methods or classes used by computer programs to request services from the operating system, software libraries or any other service providers running on the computer. The other iPhone-specific components that you need to learn is SQLite, Core
animation, Accelerometer, phone and media playing APIs.
A computer programmer uses the words in the API to make application programs. In addition to Cocoa there are other libraries such as OpenGL which you
need to learn to give your application that extra punch which can knock down the competition.
To develop apps for the iPhone we use Xcode. It is an IDE ( Intigrated Development Environment) for the iPhone.