문제

I am working in a team and recently we have lost all of our syntax highlighting in our Xcode project. It is a problem across all of our environments, so it's not a problem with the local machine. We have all cleared our derived data, deleted the precompiled headers in /var/folders/. Also, everyone is getting the following error in their console:

1/12/12 9:40:42.126 PM Xcode:  IDEIndexingClangInvocation: Failed to save PCH file: /Users/sashimiblade/Library/Developer/Xcode/DerivedData/Project-gfgcpcthwcmainhhtgpavaqacqkr/Index/PrecompiledHeaders/Project-Prefix-gwxtmfzfhffkhmardmbbgmpwrntg_ast/Project-Prefix.pch.pth

Any ideas? This has been driving me nuts for several days and I just cannot live without my Autocomplete or syntax highlighting!

도움이 되었습니까?

해결책

Ok, I figured it out. I had Core-Plot in the framework area of my project, and Xcode was looking to resolve Core-Plot as a framework even though it was just a binary and the associated headers. So I moved Core-Plot into a folder with my other classes, removed the old Core-Plot path from the library search paths and also blew away the header search paths and now my autocomplete and code highlighting is back!! I think this is a bug in Xcode...

다른 팁

I'm not trying to get any rep - just want to make what @EricGoldberg and @CornPuff mentioned in the comments above stand out. It simply is a HUGE time-saver.

Autocompletion gone in Xcode? (quite a usual occurence to be honest)

Just follow this super-easy steps :

  • Add a new line (or any other simple edit, for that matter) to your YourAppName-Prefix.pch file

  • Save

  • Rebuild your project

And, it's auto-magically fixed! :-)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top