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.
6 Answers
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.

- 8,285
- 3
- 19
- 32

- 107,306
- 24
- 181
- 206
-
3[UPDATE](http://stackoverflow.com/questions/813529/documentation-generator-for-objective-c/6487090#6487090): appledoc is the new & improved solution. "[It] uses doxygen as a base for extracting the documentation from source files and then converts the doxygen output into nicer looking layout." – ma11hew28 Jun 26 '11 at 22:51
-
7appledoc is problematic - it requires you to attribute it in your documentation or your website that you used appledoc. Since when does a formatter require attribution?!? – Feloneous Cat Jan 04 '12 at 18:19
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.

- 104,111
- 38
- 209
- 254

- 121,420
- 116
- 450
- 651
-
1We've recently switched from Doxygen to Appledoc, and I am very happy so far. The best thing about it IMO is that the quick pop-up help bubbles (option-click) have all the same info you get for Apple docs. Doxygen generated docsets don't have the correct structure to be picked up by those. – DougW Nov 11 '11 at 23:03
-
Commenting that the two guides you've linked have moved to [here for writing comments](http://gentlebytes.com/appledoc-docs-comments/) and [here for examples of command line settings](http://gentlebytes.com/appledoc-docs-settings/). – Ben Kreeger Jul 07 '12 at 19:31
-
Doxygen is very widely used. I seem to use it as an SO answer about once a week, too.

- 110,348
- 25
- 193
- 263
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).

- 863
- 8
- 21
-
Can't generate Objective C and Swift documentation from Swift classes, which is a major drawback. – adev Mar 07 '18 at 00:13
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.

- 77,985
- 20
- 184
- 180
-
HeaderDoc development is pretty stagnant. Doxygen is a much better choice. With appropriate add-ons, Doxygen output can be made to look very similar to HeaderDoc if that's your preference. – Barry Wark May 02 '09 at 00:14
-
5Stagnant or not, it's a valid option for generating documentation for Objective-C/C/C++. I personally hate the documentation that Doxygen generates. – Jason Coco May 02 '09 at 01:01
-
Yeah that is what I was looking for! If coding with Xcode on a Mac, why not use the stuff Apple uses anyways? – Nils Jan 19 '12 at 09:17
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.

- 3,482
- 5
- 27
- 48