Installing Xcode 4 and the iOS 4 SDK

From Techotopia
Jump to: navigation, search
PreviousTable of ContentsNext
iOS 4 Architecture and SDK Frameworks (iOS 4 Xcode 4)Creating a Simple iOS 4 iPhone App (Xcode 4)


Learn SwiftUI and take your iOS Development to the Next Level
SwiftUI Essentials – iOS 16 Edition book is now available in Print ($39.99) and eBook ($29.99) editions. Learn more...

Buy Print Preview Book


iPhone apps are developed using the iOS SDK in conjunction with Apple’s Xcode 4 development environment. The iOS SDK contains the development frameworks that were outlined in iOS 4 Architecture and SDK Frameworks. Xcode 4 is an integrated development environment (IDE) within which you will code, compile, test and debug your iOS iPhone applications. The Xcode 4 environment also includes a feature called Interface Builder that enables you to graphically design the user interface of your application using the components provided by the UIKit framework.

In this chapter we will cover the steps involved in installing both Xcode 4 and the iOS 4 SDK on Mac OS X.

Identifying if you have an Intel or PowerPC based Mac

Only Intel based Mac OS X systems can be used to develop applications for the iOS. If you have an older, PowerPC based Mac then you will need to purchase a new system before you can begin your iPhone app development project. If you are unsure of the processor type inside your Mac, you can find this information by opening the Finder and selecting the About This Mac option from the Apple menu. In the resulting dialog check the Processor line. The following figure illustrates the results obtained on an Intel based system: <google>IOSBOX</google>

Identifying the CPU in a Mac system


If the dialog on your Mac does not reflect the presence of an Intel based processor then your current system is, sadly, unsuitable as a platform for iPhone iOS app development.

In addition, the iOS 4.3 SDK with Xcode 4 environment requires that the version of Mac OS X running on the system be version 10.6.6 or later. If the “About This Mac” dialog does not indicate that Mac OS X 10.6.6 or later is running, click on the Software Update… button to download and install the appropriate operating system upgrades.

Installing Xcode 4 and the iOS 4 SDK

The best way to obtain the latest versions of Xcode 4 and the iOS SDK is to download them from the Apple iOS Dev Center web site at:

http://developer.apple.com/devcenter/ios/index.action

In order to download Xcode 4 with the iOS SDK, you will either need to be a member of the iOS or Mac Developer programs or purchase a copy from the Mac App Store at:

http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1

The download is over 3.5GB in size and may take a number of hours to complete depending on the speed of your internet connection. The package takes the form of a disk image (.dmg) file. Once the download has completed, a new window will open as follows displaying the contents of the .dmg file:


The iOS 4 and Xcode 4 disk image contents


If this window does not open by default, it can be opened by clicking on the SDK disk drive icon on the desktop or by navigating to the Downloads directory of your home folder and double clicking on the corresponding dmg file.

Initiate the installation by double clicking on the package icon (the one that looks like an opening box) and follow the instructions until you reach the Custom Install screen:


Installing iOS 4 SDK and Xcode 4


The default selections on this screen are adequate for most requirements so unless you have specific needs there is no necessity to alter these selections. Continue to the next screen, review the information and click Install to begin the installation. Note that you may first be prompted to enter your password as a security precaution. The duration of the installation process will vary depending on the speed and current load on the computer, but typically completes in 25 - 45 minutes.


Starting Xcode 4

Having successfully installed the SDK and Xcode 4, the next step is to launch it so that we can write and then create a sample iPhone application. To start up Xcode 4, open the Finder, click on the Macintosh HD device in the left hand panel then double click on the Developer folder, followed by the Applications folder. Within this folder you should see an icon for Xcode. Since you will be making frequent use of this tool take this opportunity to drag and drop it into your dock for easier access in the future. Click on the Xcode icon in the dock to launch the tool.

Once Xcode has loaded, and assuming this is the first time you have used Xcode on this system, you will be presented with the Welcome screen from which you are ready to proceed:


The Xcode 4 Welcome screen


Having installed the iPhone SDK and successfully launched Xcode 4 we can now look at Creating a Simple iOS 4 iPhone App (Xcode 4).


Learn SwiftUI and take your iOS Development to the Next Level
SwiftUI Essentials – iOS 16 Edition book is now available in Print ($39.99) and eBook ($29.99) editions. Learn more...

Buy Print Preview Book



PreviousTable of ContentsNext
iOS 4 Architecture and SDK Frameworks (iOS 4 Xcode 4)Creating a Simple iOS 4 iPhone App (Xcode 4)