Documenting iOS App Using Jazzy

Viren Malhan
3 min readJun 7, 2019

--

Documentation should be as important to a developer as all other facets of development. Documenting your code will lead you to become a better developer, and will contribute to being a great team member.

But the fact is most of the developers, do not get time to document their code properly.

So in order to make documenting easy and less time consuming, Realm has developed a library called Jazzy.

Jazzy is a command-line utility that generates documentation for Swift or Objective-C

Jazzy is very easy to install and use. It creates Apple like documentation, in which left hand side it names files/structures in alphabetically order.

It can be installed by just one terminal command.

sudo gem install jazzy

After installation is done, Next step is comment your code properly.

You should comment every class, struct, enum, IBOutlet, IBAction, methods, infact everything. XCode has keyboard shortcut to add documentation.

Command + option + /

You have to keep your mouse cursor one line above of class/struct/method etc to generate documentation placeholder.

After commenting is done, You just need one terminal command to generate your document.

jazzy --min-acl private

here private is access specifier, you can provide internal if you do not want tp include private files for documentation.

After successfully execution of command, you can find your app document in your app root directory by the name of folder docs.

Inside docs folder, you will find index.html which is the index page of created document.

Your generated document will look like this.

This is the easiest way to document your complete app.

For more detail about jazzy, please refer https://github.com/realm/jazzy

You can download Github project from here

--

--