views:

15

answers:

1

I'm new to xcode and I must be missing something.

Create a new command-line project. Call it tempprog (for instance).
Select Project/Edit Project Settings.
Edit the name of the prefix header (tempprog_Prefixz.pch).
Build - it will fail, of course, looking for tempprog_Prefixz.pch
Now change the name of the prefix header back to tempprog_Prefix.pch.
Build again - it should work, but doesn't. It's still looking for tempprog_Prefixz.pch

Cleaning does not rectify the situation. What am I missing here? Where is the Prefixz.pch name being retained? If you look in the build output at the ProcessPCH command you can see that it still wants to use Prefixz.

A: 

It turns out there's a system of setting priorities.

From Working With Xcode Build Settings:

The levels at which build settings can be set, and their precedences are:

xcodebuild command-line flags (only applicable for command-line builds) The target, editable via a target's Info inspector The project, editable via a project's Info inspector Xcode application settings, as set in Xcode > Preferences... Xcode's built in defaults The user environment, perhaps as set in a user's ~/.MacOSX/environment.plist file

dar512