Saturday, August 11

How to count the lines of an Xcode project

The easiest way is to open the terminal app and navigate to the Xcode project and paste the following line:
find . "(" -name "*.m" -or -name "*.h" -or -name "*.mm" -or -name "*.cpp" ")" -print0 | xargs -0 wc -l
 You will get an result similar like this one:
count lines in xcode
terminal output

So now you know the lines per file and at the end the lines total of all the *.h and *.m files.