-6

I am trying to find total number of files,functions and total number of line code in iOS application.Is there any tool for find this.Is this possible to find ?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • duplicate http://stackoverflow.com/questions/4005871/number-of-lines-from-xcode-project http://stackoverflow.com/questions/2003534/how-to-find-out-how-many-lines-of-code-there-are-in-an-xcode-project – maroux May 03 '13 at 12:57
  • How can this be off topic? Development is about a lot more than what code to type for what problem. Sometimes it involves analyzing what you are doing. – SafeFastExpressive Dec 01 '17 at 18:49

2 Answers2

2

for line of codes :

find . "(" -name ".m" -or -name ".mm" -or -name "*.cpp" ")" -print0 | xargs -0 wc -l

for number of files :

//you need to write this code
NSFileManager *filemgr = [NSFileManager defaultManager];
NSArray *filelist= [filemgr directoryContentsAtPath: yourPath];
int count = [filelist count];
NSLog ("%i",count);

for number of functions :

No tool or code in my knowledge
Anil
  • 1,028
  • 9
  • 20
-1

ls, grep and wc are your friends. ls to count files, grep to count functions and wc to count lines per file.

ruipacheco
  • 15,025
  • 19
  • 82
  • 138