问题
I have a project where Xcode 4 stopped indexing. As a consequence neither the complete class browser (symbol navigator) nor code sense work. 0 Classes and Protocols etc. are shown. I restarted indexing process by removal of some temporary files in the derived data and the xcodeproj area. But this does not help. Does anyone know what can Xcode prevent from indexing?
I rebuilt the whole project and hopefully found the reason: In my-Prefix.pch file I included #import <myheader.h>, where myheader.h was resolved via Header Search Path. When I changed this line to #import "myheader.h", code sense and class browser worked again.
回答1:
This occurs a few times a week on my mac.
- I quit xcode
- I delete the ~/Library/Developer/Xcode/DerivedDatas folder
- I relaunch Xcode, reindex start again.
Hope this will work for you too.
回答2:
If deleting derivedData didn't work for you just tick the Target Membership box on the right side while your xcode is set to recently imported .m file
来源:https://stackoverflow.com/questions/5887327/xcode-4-is-not-indexing-my-project