Changes

Jump to: navigation, search

Installing Xcode and Compiling Objective-C on Mac OS X

1,842 bytes added, 19:01, 25 September 2009
Starting xCode
== Starting xCode ==
 
Having successfully installed the SDK and Xcode, the next step is to launch it so that we can write and then compile a sample Objective-C application. To start up Xcode, open the Finder, click the ''Macintosh HD'' device in the left had panel then double click on the ''Developer'' folder, followed by the ''Applications'' folder. Within this folder you should see an icon for Xcode. Double click on this icon to launch the tool. Once Xcode has loaded, and assuming this is the first time you have used Xcode on this system, you will presented with the ''Welcome'' screen. On this screen, click on the option to ''Create your first Cocoa application'' to proceed to the developer documentation screen.
 
== Starting a New Project ==
 
Each application created in Xcode is contained within a ''project''. The first step in developing application, therefore, is to create a new project. This is achieved by selecting the ''File -> New Project...'' menu option. The ''New Project'' window provides a range of different types of Mac OS applications that can be created. If you downloaded and installed the iPhone version of the SDK, options are also provided to create a new iPhone application:
 
 
[[Image:xcode_new_project.jpg|Creating a new Xcode project]]
 
 
Under the Mac OS X section, scroll down the list and select ''Command Line Utility''. In the main panel, choose Foundation Tool then click on the ''Choose..'' button. In the resulting panel, enter "SampleApp'' in the ''Save As:'' field. By default, Xcode will put the project files in your ''Documents'' folder so be sure to create and specify a specific folder for your Objective-C development work before proceeding by clicking the ''Save'' button. Xcode will subsequently create the new project and open the main Xcode window:
 
 
[[Image:xcode_main_window.jpg|The main Xcode window]]

Navigation menu