Xcode 4: Accessing Build Settings

March 14th, 2011

Filed under: Xcode | 4 comments

To access build settings in Xcode 4, select the project file from the project navigator on the left side of the project window. The project file should be at the top of the project navigator. Selecting the project file opens the project settings editor. The project settings editor is Xcode 4’s replacement for Xcode 3’s project and target inspectors. Select either the project or a target from the project settings editor. Click the Build Settings button at the top of the editor. Now you should see a list of the project’s build settings.

Xcode 4 Build Settings Window

Above the list of build settings are two sets of buttons. The first set is Basic/All. Clicking the Basic button shows the most commonly accessed build settings. Clicking the All button shows all the build settings.

The second set of buttons is Combined/Levels. The screenshot shows what appears when you click the Levels button. Multiple columns of build settings are visible: default, project, target, and resolved. If you select the project from the build settings editor instead of the target, there is no column for the target. Showing levels allows you to see any changes from the default build settings as well as any differences between project and target build settings.

If you click the Combined button, one column of build settings appears in the editor. The column shows the effective value of each build setting, the value Xcode will use when you build the project. Showing the combined build settings simplifies changing a build setting’s value.

Tags:


4 thoughts on “Xcode 4: Accessing Build Settings

  1. pq says:

    is there a way to specify settings for a single file like, for example, which compiler dialect to use, except than creating a project for that single file? It was possible in xcode 3.x and supported in XCode 4 if specified in imported projects.

    • Mark Szymczyk says:

      To specify flags for a single file, go to the Build Phases section of the target. The Build Phases button is next to the Build Settings button, which you can see in the screenshot in the post. Go to the Compile Sources build phase and click the disclosure triangle. From there you can add compiler flags for a single file.

  2. JRR says:

    Hi,I’m using xcode 4.4.1 but not able to see “Link Binary With Libraries”.Here I want to use “zbar” barcode libraries for barcode implimentation.Thanks.

    • Mark Szymczyk says:

      JRR,

      Click the Build Phases button at the top of the project editor to find the Link Binary with Libraries build phase. If you look at the screenshot in the post, you can see that the Build Phases button is next to the Build Settings button at the top of the screenshot.

Leave a Reply to pq Cancel reply

Your email address will not be published. Required fields are marked *