Question

Is there a generally-accepted documentation generator for Objective-C (similar to RDoc for Ruby)? I've seen Doxygen and ObjcDoc, and am wondering which is most widely used.

Was it helpful?

Solution

Doxygen is probably the most widely used option. Because it's not just for ObjC (doxygen supports many other languages), the development is lively and the community quite strong. HeaderDoc (now an open source project), by comparison appears to have largely stagnated. HeaderDoc only produces HTML output, while doxygen also produces PDF, LaTeX and many other output forms besides HTML. Even Apple seems to recommend doxygen, with this guide to automatically producing documentation sets, compatible with Xcode's help viewer, from within your Xcode build process.

It's worth noting that doxygen can read HeaderDoc-style comments, so you can write your documentation in HeaderDoc style and decide later whether to produce the final output using doxygen or HeaderDoc.

OTHER TIPS

Check out appledoc. It's based on Doxygen. You can see that it eats its own dog food in that it generates the appledoc reference documentation for the appledoc source code. Compare, for example, GBComment.h to GBComment Class Reference.

Also, take a look at Xcode's Documentation Set Guide for comprehensive instructions on how to create documentation that works with Xcode. These are the instructions that appledoc automates.

Doxygen is very widely used. I seem to use it as an SO answer about once a week, too.

A new tool is Jazzy by Realm, which generates documentation in the new Xcode 6 style, and supports generating Swift documentation (as well as Objective-C).

As well as doxygen, apple has a tool the comes with the development tools. It generates the type of documentation you see on things like the SystenConfiguration framework. The tool is called HeaderDoc the documentation can be found in the HeaderDoc User Guide.

Maybe you should try jazzy by Realm. It's an open source project. jazzy supports both Objective-C & Swift.

"The output matches the look and feel of Apple’s official reference documentation, post WWDC 2014." Which you can judge from the sample doc it provides.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top