Creating a New Xcode 4 Project

If you want to start a new software development undertaking using Xcode 4, you need to first decide whether you need a single Xcode project or multiple related projects. For a simple application or utility, a single project should suffice. However, if you have several related executables that need to link against a custom library, you probably want at least a separate project for the library and another for the executables, and possibly a separate project for each executable. In that case, see Create a New Workspace.

Create a Standalone Project

If you decide that you don’t need a workspace, open Xcode 4 and click “Create a new Xcode project” in the startup screen. If Xcode 4 is already open, choose File > New > New Project. In the dialog that appears, be careful to select the type of project you want to create for the correct platform.

If you decide later that you want to create a workspace and add your project to it after all, see the instructions in Using an Existing Xcode 3 Project.

Create a New Workspace

If you decide you want to work with two or more related projects, create an Xcode workspace. To do so, use the following procedure:

  1. When Xcode 4 opens, ignore the startup screen and choose File > New > New Workspace.

  2. In the New Workspace dialog, specify the location for the workspace file and the name of the workspace. If your projects are in the same directory, it might be convenient to create a new folder and put the workspace file in there as well. To avoid possible confusion with your projects, give the workspace a unique name. Click Save.

  3. Choose File > New > New Project and follow the directions for each project you want to add. Be careful to select the correct platform and project type for your purposes.