Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode search not working properly [duplicate]

Tags:

xcode

I've been having trouble with the search (Command+Shift+F) function in in Xcode. I searched through the internet but didn't seem to find a solution. Seems to be failing only on a specific project (the other projects I work seem to be fine), and I use the 'search' option very often.

I's there some kind of "cache" for the Xcode search? And is there a way to reset that? Any ideas?

enter image description here

Here I am searching a string I've taken out from the project! So I am positive it should return a location inside my project.

like image 268
Ignacio Oroná Avatar asked Jun 08 '16 15:06

Ignacio Oroná


4 Answers

If you want to search for text in the project, you should change the search parameters to:

Find > Text > Containing

enter image description here

like image 189
Wilson XJ Avatar answered Nov 13 '22 16:11

Wilson XJ


You may have multiple lines in the search field which you cannot see.

Try pressing Cmd-A then Backspace in the search box to fully clear it.

like image 37
planetmik Avatar answered Nov 13 '22 14:11

planetmik


I recently had this issue (which is how I found this post). In my case, everything was set as it should be:

  1. Find
  2. Text
  3. Containing
  4. Ignoring Case

and it still would not find text.

It appeared to be in my case, a corrupted index. Quiting Xcode and deleting derived data - I Use DevCleaner from the App Store (not affiliated).

After that, I relaunched Xcode, waited a couple of minutes for the indexes to rebuild and everything works fine again.

like image 1
Matthew Cawley Avatar answered Nov 13 '22 16:11

Matthew Cawley


  1. Click on searchfield
  2. Select Find above the searchfield
  3. Change to Find > Text > Containing

then problem solved

like image 1
Akshay K Avatar answered Nov 13 '22 16:11

Akshay K