Xcode Find and replace in all project files

user426132 picture user426132 · Oct 1, 2013 · Viewed 39.5k times · Source

I need to replace NSLog with DDLogVerbose in all files in the current project I am working on… What is an easy method to do this? (the search navigator only has search in it).

Also I need to add a line at the beginning of all .m files. How is this done quickly? (There are over 500 such files.)

Answer

Souleiman picture Souleiman · Dec 25, 2013

Here are some pictures. In the toolbar search, you have to press 'Find' then a menu appears – pick replace. Now you can replace project-wide.

step 1 step 2

Happy coding!