Xcode Plugin Manager: Alcatraz

No doubt that Xcode is the most appropriate IDE for developing cool iOS and Mac apps. All useful features those are required throughout the lifecycle of an app, are effectively integrated within Xcode. However, some cool features are still missing. Have you ever thought of maintaining proper alignment of your code in Xcode? Is there any built-in tool to do that? What about creating an Apple like method documentation for the functions defined within the code? You can add new features to your Xcode easily and make it more usable. Want to know how? Read on this article.

First, download Alcatraz Xcode package manager:

You can download the most popular Xcode plugin manager from the official website of Alcatraz. This plugin manager is only available for Xcode 5.0 or higher versions. To download the plugin manager just run following command in your terminal.

curl -fsSL | sh

Now quit and restart Xcode.You will get a menu option under the Window menu of Xcode as shown in the image below.Package Manager

Next, we will see how to download VVDocumenter, XAlign and XToDo using Alcartaz Plugin Manager

1. VVDocumenter (Function Documentation Plugin)

Let’s see how to download VVDocumenter using Alcartaz Plugin Manager:

a) Open Alcatraz plugin manager. Search VVDocumenter. Install it by clicking the install button located on right side of the VVDocumenter-Xcode in the list.

b) Now quit and restart Xcode. You will see VVDocumenter menu option under the Window menu of Xcode.


If you are facing problems installing VVDocumenter, you can download it from GitHub and  run the project. Now you quit and restart Xcode.

c) Open VVDocumenter to configure it according to your requirement.

VVDocumenter Config

Usages of VVDocumenter:

Open the file (preferably interface file with .h extension for Objective-C projects) where you have declared the method of a specific class. Move the cursor to the line just above the declaration or definition (for .swift files) of the method for which you are going to make documentation. Type three “/” consecutively. VVDocumenter will automatically add documentation code snippet for the underlying method. The following two .gifs collected from VVDocumenter’s GitHub repository clearly shows the process.



VVDocumenter for Objective-C:


VVDocumenter for Swift:

2. XAlign: The Alignment Plugin for Xcode

Here are the steps:

a) Download the XAlign plugin using the PackageManager. Once download is complete, quit and restart Xcode.

b) You can find out it from Edit menu of Xcode.


Usages of XAlign:

XAlign automatically aligns selected code in Xcode with keyboard shortcut  Command + Shift + X. Here are two examples.



3. XToDo: The special comment plugin for Xcode

Sometimes we do use //TODO: , //FIXME: , //???: and //!!!: comment tags for different purposes like:

      1. Writing due development code, //TODO:
      2. Fixing tag for a detected bug, //FIXME:
      3. Attention catching code snippet, //!!!: and
      4. For some questionable code. //???:

Tags at work:

Suppose you have NSObject‘s child class name MyClass. Just write down the following code snippet at the very end of MyClass.m file.

///TODO: To do list 
///???: Questionable code 
///FIXME: Sample Fix me 
///!!!: Need further clarification

Now you can see the effects of these special comment tags from the @implementation detail list of MyClass.m

Screen Shot 2014-10-13 at 3.28.26 PM

Steps to integrate XToDo with Xcode:

>a) Download the plugin form PackageManager.

b) Quit and restart Xcode, open the View menu, you can see something like that.

Screen Shot 2014-10-13 at 3.15.17 PM

Now and onwards you can add the following special comment tags by using keyboard shot-cuts

  1. //TODO : [CTRL + SHIFT + T]
  2. //FIXME : [CTRL + SHIFT + X]
  3. //!!! : [CTRL + SHIFT + 1]
  4. //??? : [CTRL + SHIFT + Q]

Where to go from here?

A lot of other plugins are available to download from Alcatraz plugin manager. You can see the preview of it and can also go to the GitHub repository of that plugin.

If you want more details about method documentation in Xcode you can go through this blog . To learn about more about Alcatraz, you may visit it’s official website. If you have any questions or comments on this tutorial, please feel free to ask or leave a comment.

Sauvik Dolui

Sauvik Dolui is an iOS enthusiast and ingenious blogger who loves all things design and technology. He works closely with clients across Fortune 500 companies to develop an effective technical strategy. Besides iOS apps he also loves to develop cross-platform mobile games. The Little Indian Archer, a bow-arrow game developed by Sauvik, can be found on App Store and Play Store as well. When he is not coding, he can be found travelling around the villages or reading a book. By the way he is crazy about soccer.