When trying to build a Universal version of my WordRecorder app I discovered that I could not view the properties window for my executable target, the project itself, or the project’s SCM options. Xcode gave me the following lovely error:
I don’t know what this is about, but through some hacking and tinkering with the Xcode file I came up with the following messy workaround:
- Make your Xcode project using qmake -spec macx-xcode if you haven’t already.
- Open/reload the resulting project in XCode 3. Trying to edit the project properties will yield the above error.
- Save the Project. This step is necessary as it makes Xcode totally reformat the file making the edit we’re about to do much easier.
- Open the project’s “project.pbxproj” file in your text editor. It lives inside the “.xcodeproject” folder so you’ll have to do a “Show Package Contents” to see it in the Finder.
- Find the following comment (“hello_world” will be the name of your own target)
/* Build configuration list for PBXNativeTarget "hello_world" */
- Beneath this comment you’ll see the following list of build configurations (the actual IDs will be different):
isa = XCConfigurationList; buildConfigurations = ( 2F9BD7250DBC2F9500BBEE4F /* Debug */, 2F9BD7260DBC2F9500BBEE4F /* Release */, 2F9BD7270DBC2F9500BBEE4F /* Default */, );
- Remove the entire line containing the identifier with the name ‘Default’ and save the file. The result will look like this:
isa = XCConfigurationList; buildConfigurations = ( 2F9BD7250DBC2F9500BBEE4F /* Debug */, 2F9BD7260DBC2F9500BBEE4F /* Release */, );
- Go back to Xcode. It should prompt you to reload the project from disk. Reload it. You should now be able to edit your project’s properties again. Unfortunately you will have to repeat this step whenever you rebuild your project using qmake.
I don’t know why this fix works, but it beats having to recreate our Xcode project by hand, and everything still seems to build without incident after the fix.
I’m not sure if this is Apple or Trolltech’s problem as I can’t remember if this worked in Qt 4.3.3 / Xcode 2. Xcode 3 probably isn’t officially supported by qmake yet, anyway.