Creating a New iPhone Project

Over the next few Lessons, we will be creating a full-functioned calculator, that can handle basic arithmetic, as well as fractional operations. By the end, we will also have a GUI (graphic user interface), but for now, we will be working off the console, as we have been doing.

We’ll begin by creating a new project in Xcode. Note that the screenshots below are from Xcode 3.2.3 running under OS X 10.6.5; the steps should be generally the same if you’re lucky enough to be running Xcode 4. Note, however, that Xcode 4 is under NDA and is only available for paid developer program members; therefore, we will not be talking about Xcode 4 until it is officially released.

Let’s begin!

Creating the Xcode Project

Launch Xcode. If it’s not in your Dock already, navigate to /Developer/Applications, and ideally, drag it to your Dock; otherwise, you’ll have to look for it every time you launch the program.

Xcode is located at /Developer/Applications/

Location of Xcode on Disk

When the launch window shows up, click “Create a new Xcode project”; alternatively, navigate to File > New Project (⇧⌘N). Choose the “Window-based Application”, and make sure “Product” is “iPhone.” Do not use Core Data. See the screenshot below:

Choose the Window-based Application template

Xcode 3 New Project Window

Save the project anywhere on disk; I’d recommend having a dedicated “Developer” folder in your Home folder. (Of course, feel free to search for an icon that you can use for your folder.) I’d also strongly recommend that you save your project as “Calculator”; otherwise, your code could result in errors.

Save your Project as "Calculator"

Save your Project as "Calculator"

After you click “Save,” you’ll be presented with the main Xcode window. Note that yours probably will look a little different from mine, but the general functionality is still the same. If you wish to adopt my layout, I’m using the All-In-One layout, found in Xcode > Preferences > General > Layout.

The Xcode main window

Xcode 3 Main Window

Regardless of which view you use, you will see the File list, the Organizer, and the Toolbar. For this Lesson, we will only be concerned with the File list and Organizer. I’ll do an Extension on using Xcode later.

At the moment, click on Build and Run from the toolbar. After a brief moment, the iPhone Simulator will appear, and you will see a blank (white) screen.

Blank iPhone Simulator Window

Blank iPhone Simulator Program

Here, you’re done…for now. Feel free to close the current project window…we’ll be returning to it in a few lessons. Hopefully though, this has whetted your appetite. We now move on to proper object-oriented programming

Leave a comment


  1. i dont have window based application option in my version of Xcode. does page-based or single view application work? until your response comes ill use page-based because it sounds very similar to window-based. thanks in advance!

  2. nevermind! the empty application option has the same description as window-based (includes application delegate and window. starting point for any application)

  1. Objects (Part 1): Splitting Classes Into Multiple Files « Programming for iOS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

  • Welcome

    My goal is to make CupsOfCocoa into a beautiful source for beginners to the iPhone platform to get started. Subscribe below for more, and stay tuned!

  • Contact Me

    If you need to contact me for any reason, feel free to send me an email.
  • The Giving Spirit

    If you've found this site helpful, would you consider donating a little sum? Any amount is appreciated...Thanks so much!

  • Roadmap

  • Enter your email address to follow this blog and receive notifications of new posts by email.

    Join 222 other followers

  • Back to the Past

    December 2010
    S M T W T F S
    « Nov   Jan »
  • Time Machine

  • You count!

  • Worldwide Stats

    free counters
  • Advertisements
%d bloggers like this: