Search code examples
objective-ccocoaxcodexcode4

Xcode 4 code loses syntax coloring when importing project from Xcode 3


I have just upgraded to the new Xcode 4 and the code is not colored has it should be. I am trying to use a project that I created on Xcode 3.

For instance, the string 'NSString' is not colored in my custom code, but when I switch to Apple's code (NSString.h for ex.) everything is well colored.

How can I fix that?

Thanks a lot, Martin


Solution

  • Open the Organizer (Window > Organizer) and select the Projects mode. Select your project in the left-hand view and then click the Delete… button for the project's Derived Data.

    This will delete the code sense index for the project and force Xcode to rebuild the index, which should fix the problem.