Search code examples
xcodeautocompletexcode4

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.

Solution

  • In our case the culprit turned out to be old version of the three20 libs. To get the project working I had to:

    1. Remove all references to three20 from the project
    2. Follow the instructions at http://three20.info/article/2011-03-10-Xcode4-Support

    As soon as the new library was installed, xcode4 automatically reindexed. Code completion, jump to definition and even Refactor all work now. The Joy(tm) of working with Xcode is back! :)

    In more general terms, any library that puts it header files into BUILT_PRODUCT_DIR is likely to have similar issues.