Wednesday, March 23, 2011

Project 1 - Hello, World!

To create a new project:

1. Start up Xcode.
2. On the left-hand column, click "Create a new Xcode project"
3. In the new window, choose Mac OS X Application from the left hand menu. Select "Console Application" and change Type to "Foundation".
4. Hit choose and name your project (mine is HelloWorld)

Apple has already written our first application for us!
To run it, press the "Build and Run" button at the top of the project window.
To see the result of the program, the console needs to be open. Open it with either CMD-SHIFT-R or clicking "Console" under the "Run" menu at the top of the screen.

This program demonstrates how Objective-C outputs data to the console. The key component of this program is a file called "HelloWorld.m" (or YourProjectName.m). Feel free to change the text within the parentheses on Line 7 of this file to change what displays in your console when the program runs.

I know, it's not very exciting, but we now know how to prepare an environment where we can explore the intricacies of this language. Stay tuned for more!


No comments:

Post a Comment