Number of classes in project / workspace
You can use the cloc , which can also be set via the Homebrew : brew install cloc
.
Cloc is an open source command line tool for counting lines of code, but it also provides a file count, grouped by file type. Simplest form cloc <path-to-your-project-dir>
, but output can be configured with parameters.
A more complex solution (IMHO too complicated) using Sonarqube with the Objective C plugin. Sonarqube has a nice interface and lots of features, but just for class counting, that's a lot.
source to share
An easy way to get a rough idea for a project is to check the Compile Project Sources section of the Build Phases . Compilation sources will list all source files (.m, .swift) and not include headers.
Assuming roughly one class per source file will give you an idea of how many classes there are in your project at a glance. Note that this does not include built-in projects or frameworks.
source to share