This is my second mac app, iKLOC (iTunes link) is available on Mac App Store! This time it was just a 4 day waiting time!

What is iKLOC?

iKLOC is a quick little tool count the number of lines of source code in your iOS or Mac app.  Just like my other app, iConify, the speciality of iKLOC is that, it just works. Launch the app, open your .XCodeProj file and boom, it counts your lines.

How is it different from traditional command line counting like WC/GREP?

The command line counters give you a very approximate results since they cannot exclude comments in your files. For example, the ASIHTTP Frameworks’ ASIHTTPRequest.m file has ~4000 lines of code and 350 lines of comments. ~8% of your code size. Most of your short header file have approximately <50 lines of code have a ~20 line comment/copyright notice which also gets counted as code. Using iKLOC, you will exactly know how many source code lines and how many comment lines are there in your app.

Second important feature of iKLOC is that it can auto export NSLocalizedString macros from your project and create the Localizable.Strings file which you can send it to the translators. All it takes is one click!

Another important feature is that, you can selectively ignore files by unchecking them. Total counts are updated immediately. For example, when you count using

Myths behind KLOC

While the quote by Bill Gates

Measuring progress by lines of code is like measuring aircraft building progress by weight

stands true for Software, KLOC counting goes wrong only when you try to compare projects across domains. For example a 2000 line kernel code or a routing algorithm is more complicated and more tricky to write than a 20,000 line iOS app. But when you compare software of similar nature like, two iOS apps, KLOC gives you a pretty good estimate of how big a software/complex a software is. If you are a iOS software development company, you can use this valuable tool to compare the project sizes and will allow you to make a more educated guess on the cost estimates the next time.


The app is available exclusively from the Mac App Store.

Do leave your feedback!

Follow me on Twitter