Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4: Auto-complete & Jump to Definition broken in my Xcode 3 Project

My project was created in Xcode 3, I'm opening it in Xcode 4 and notice the following:

  • 'Jump to Definition' no longer works with my own symbols (However UI* and even TT* symbols do work fine!)
  • Auto-complete / 'Code sense' is as bad as Xcode 3, i.e., it suggests everything
  • My projects' classes do not show up in the class navigator (Again, system and Three20 classes do show up!)

When creating a new Xcode 4 project however, these features do seem to work. Unfortunately the only workaround seems to be to recreate the project and re-import everything. This project is too large!

Things I've tried:

  • Removing the derived data in the organiser
  • Cleaning the project
  • Installing both Xcode 4 Gold Master and Final versions

Update

  • This bug has not been resolved in Xcode 4.0.1.
like image 967
Jimmy Avatar asked Mar 11 '11 15:03

Jimmy


People also ask

How do I use autocomplete in Xcode?

Go to Xcode > Preferences > Text Editing again. Quit out of Xcode and then relaunch Xcode. Now go to Code completion and check 'Suggest completions while typing'. Try typing library function or enum and enjoy!

Does Xcode have code completion?

Using Code completion in XcodeOnce enabled, Xcode will now offer code completion based on what you have typed and offer suggestions for completing the syntax.

What does P mean in Xcode?

P: property (IIRC Xcode favors L/V for Swift, but you see P for ObjC properties)

How do I get suggestions in Xcode?

Press the escape key when auto-complete makes the first suggestion. This will display the list. Escape or control-comma will show the list, control-period will accept the current suggestion and (subsequently) rotate through suggestions, control-slash will move to the next placeholder argument that was inserted.


2 Answers

On Window Menu:

  1. Organizer
  2. Projects tab
  3. Your Project
  4. Delete Derived Data
  5. Restart Xcode

A little tip from other's answer:

After step.4 don't rebuild the project but just restart Xcode.

like image 146
xhan Avatar answered Oct 20 '22 00:10

xhan


What worked for me when i lost xcodes super nice code hinting was:

Window(menu) -> Organizer(menu) -> Projects(tab)

then

Press delete Derived Data (this is the same as going to the folder and deleting it manually)

BUT!!!!! at this step dont rebuild but shut down xcode and reopen of the project. This worked for me.

like image 45
yeahdixon Avatar answered Oct 20 '22 01:10

yeahdixon