Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Importing a Project

If you already have existing code in another IDE, you can import your project contents into Xcode. Xcode provides an assistant for importing CodeWarrior and ProjectBuilderWO projects. Xcode also opens Project Builder projects. This section describes how to use Xcode’s project importer and open Project Builder projects in Xcode.

In this section:

Importing CodeWarrior Projects
Converting a Project Builder Project
Importing Projects From ProjectBuilderWO


Importing CodeWarrior Projects

If you have existing code in a CodeWarrior project, you can use the Xcode importer to import your CodeWarrior project and create a corresponding Xcode project. This section gives a brief description of how to import a CodeWarrior project into Xcode and lists a few steps that you can take to make the conversion process easier. While this section assumes that you are converting a project that builds an application, many of the steps apply to other types of software as well.

Before You Import

To make it easier to get your project building in Xcode, you may need to make some changes to your project before you import it. Each of these steps is described in further detail in Moving Projects from CodeWarrior to Xcode.

  1. Convert your code to use Carbon.

  2. Set the Project Type setting of your CodeWarrior project to Application Package to build your application as a package.

  3. Build the application in the Mach-O format. Mach-O is the native executable format in Mac OS X and is the only format supported by Xcode.

  4. Remove unnecessary targets from the project.

Importing Your CodeWarrior Project into Xcode

To import your project:

Most projects will not build immediately; see Moving Projects from CodeWarrior to Xcode for more information on how to get your new Xcode project to build.

Converting a Project Builder Project

If you already have an existing Project Builder project, there is very little you have to do to get it converted to, and building in, Xcode. Xcode works seamlessly with Project Builder projects. You can simply open the project in Xcode, by double-clicking on the project (.pbproj) bundle, dragging the project bundle to the Xcode application, or using the Open command in Xcode and selecting the project bundle.

Note that if you also have Project Builder installed on your computer, double-clicking the .pbproj bundle will open the project in Project Builder. To open the project in Xcode, you will have to use one of the other methods mentioned here.

Once you have opened your Project Builder project in Xcode, it should build with little or no additional work on your part. If you wish to take advantage of some of Xcode’s more significant features, such as ZeroLink, Fix and Continue, and the like, you will have to convert the targets in your project to use the native build system. Xcode does not automatically upgrade the existing targets, which use Project Builder’s Jam-based build system, when you open the project. To learn more about converting native targets, see “Converting a Project Builder Target.”

Importing Projects From ProjectBuilderWO

Xcode also supports importing projects from ProjectBuilderWO. To import a ProjectBuilderWO project, do the following:

  1. Choose File > Import Project.

  2. From the Import Project Assistant, choose Import ProjectBuilderWO Project and click Next.

  3. Type the path to the ProjectBuilderWO project in the ProjectBuilderWO Project field or click Choose to select the project from an Open dialog.

  4. Type the name you want to use for the new Xcode project in the New Project Name field and click Finish. If you do not specify a different name, Xcode uses the name of the existing project.

Xcode imports the ProjectBuilderWO project and creates a new Xcode project file. Where possible, Xcode imports the targets in the ProjectBuilderWO project as native targets. If the ProjectBuilderWO project contains targets not supported by Xcode’s native build system, the importer imports those targets as Jam-based targets.



< Previous PageNext Page > Hide TOC


Last updated: 2006-11-07




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice