0

I had a project that was working for almost a week then suddenly all my .h files lost code completion/syntax coloring.The only changes i could think of was i changed my target's name and then when i created a new set of .h and .m files this started.

Okay I have checked everything on this topic which was commonly an issue in xcode 3 and 4, i tried all solutions like

  • Clean/rebuild/restart Xcode
  • Remove Derived Data
  • Precompile Prefix Header to No
  • Add "$(SRCROOT)/**" to header search path

Nothing has worked, any help would be appreciated.Also my Xcode version is 6.1.1.

Tim
  • 8,932
  • 4
  • 43
  • 64
Jerrin
  • 173
  • 1
  • 14

2 Answers2

0

Try these Solutions:-

  1. You can able to fix that issue by change build settings like this, PreCompile Prefix Headers :NO
  2. I've been doing this, and it's worked multiple times for me (after trying all of the above previously).

Now I just hit space, backspace (the mac version) and rebuild... works nice. Then, remember to scroll (sometimes the colors don't show up until you scroll somewhere)

  • Find your prefix file: "ProjectName_prefix.pch".
  • Comment out some line. (basically change it)
  • Build your project, doesn't matter if it fails or not.
  • Uncomment it.
  • Build again.

I'm betting only step 2 (modify the prefix) is what does it, but these essentially get you back to running. Suddenly everything magically recolors itself and completes functions.

Good luck if that doesn't fix it, perhaps try doing this to your dependency pch files (three20 or FB api's)

Mohd Prophet
  • 1,511
  • 10
  • 17
0

Okay I found out what the problem was, in my case i had changed the target name and in the process the project name also.

This resulted in the change of path of the prefix header when actually the file was still at the old path. Changing it to the old path fixed the problem.

The prefix header path can be found in Build settings. usually something like ProjectName/Prefixfilename.pch

Jerrin
  • 173
  • 1
  • 14