Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4 code sense is not working

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:

  • Clean/rebuild
  • Remove Derived Data
  • Installing 4.3 documentation
  • Restart

Without any luck.

Sometimes the code sense works but mostly I just get "No Completions".

like image 291
Okku Avatar asked Mar 25 '11 10:03

Okku


2 Answers

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.

like image 176
Saikat Avatar answered Nov 10 '22 08:11

Saikat


I know this is late, but for reference: http://sealedabstract.com/code/when-xcode-4s-code-completion-autocomplete-breaks/

  • Close the project, leaving XCode still running.

  • Open XCode’s Organizer window, go to the Projects Tab, select the correct project, and hit the Delete button next to “Derived Data”.

  • Quit XCode.

  • Navigate to your project’s .xcodeproject file in Finder. Right-click, choose “Show Package Contents.”

  • Leave the project.pbxproj file, but delete the project.xcworkspace file, any .pbxuser files, and the entire userdata folder.

  • Open the project in XCode. You will see XCode riding high on the CPU usage for around 10-60 seconds, depending on the size of your project. The activity window will say “Indexing”

  • When your CPU spike returns to earth, code completion will be working again.

There's a lot of deleting going on there so please be careful, but this definitely worked for me.

like image 107
Chris Burt-Brown Avatar answered Nov 10 '22 09:11

Chris Burt-Brown