I am running a \"old\" Xcode 3 project in Xcode 4 and code sense is not working for my own classes. I have tried following:
Close all xcode windows
Delete all your projects from xcode>window>organizer and restart your project. It will now sense and index your project properly.
You can able to fix that issue by change build settings like this, PreCompile Prefix Headers :NO
It's been ages but the answer is just to move the code into a new folder and the code sense should be working now.
This happened when I added a new Objective-C Class and the code sense doesn't work only on the newly added .m and .h files (on XCode 4 latest update during this post).
For me it happened simply because the file had no target membership. If the first few answers did not work for you, go to your .m file (presumably it's this file that you're having trouble with), open the Utilities view (Edit -> Utilities -> Show File Inspector) and under "Target Membership" check the target to which you want this file to belong.
Try this:
Open Organizer then Project Tab.
Clear the "Derived Data". Xcode should re-index your project then and code sense should work. At least worked for me.
I've been doing this, and it's worked multiple times for me (after trying all of the above previously).
Edit: 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)
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)