Searching for resources in XCode

Unfortunately you can't search for resources used in XCode, it sucks. If you are using AppCode you do not have this problem.

Example: images used in .xib files won't be found in search.

One would think that this very basic and common task that should be easy to do. Not.

Using the Search Navigator would only give you results in the .h & .m files. But, what about references in a xib/storyboard/plist etc?

To get around this, open terminal and use this nifty grep command (add whatever extensions you want to search for in the curly brackets):

grep -i -r --include=*.{xib,m,h} "filenamewithoutextention" /the/location/to/search/in

Comments