Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode project CMD-Click on symbol to 'Jump to Definition' does not work

I've been using Xcode 4.3.1 since it came out now and I've worked on many different projects since. Everything has always worked fine until this new project I'm working on.

The code completion/code sense never finds anything. When I 'Command+Click' a variable or class normally it would jump to that but now I'm just getting:

Symbol Not Found

The Jump to Definition action is not working.

If I open one of my older project while this bad one is open, the old ones still work for code sense and the new one doesn't.

My partner is working on the same project, we both get the files from our repository and the code sense works on his machine for this project...just not mine.

like image 734
rob1302 Avatar asked Apr 24 '12 21:04

rob1302


5 Answers

Try this:

Open the organizer. Close your project in Xcode (leaving Xcode and the organizer running). In the organizer, in projects, click on the Delete button next to Derived Data. Quit Xcode.

Find your Xcode project via the finder. Rightclick and "Show Package Contents". Delete project.xcworkspace and xcuserdata folder.

Open up Xcode again and see if that works for you.

like image 147
g_low Avatar answered Nov 14 '22 06:11

g_low


With Xcode 8.2 I solved in this way:

  1. File > Workspace Settings
  2. Click over the little grey arrow above Advanced... Button (Derived Data)
  3. Select my project folder and delete it.

Now in your project see if cmd+click works

like image 45
Jorge Casariego Avatar answered Nov 14 '22 06:11

Jorge Casariego


Similar issues with Xcode 8 and Swift 3.

Just quitting the Xcode and Simulator, reopening the project worked.

Other times, Restarting the Mac gets rid of question mark and does navigate to relevant method implementations

And at times, simply closing the project and opening it again from 'File -> Open Recent' also works.

like image 5
Naishta Avatar answered Nov 14 '22 07:11

Naishta


In my case I solved in this way.

  • Go to Project's propreties from Project navigator.
  • Build Phases
  • Add your *.m files in "Compile Sources"

Now re-build.

This could be happen, for instance, when your manually rename a class after its creations.

Hope this help.

like image 2
Luca Davanzo Avatar answered Nov 14 '22 05:11

Luca Davanzo


Xcode 10.2.1 - simply closing Xcode entirely and reopening it solved it for me.

like image 2
Dick Thunder Avatar answered Nov 14 '22 07:11

Dick Thunder