Categories for AppleDoc

Using AppleDoc to generate Xcode help (Part 1)

PLEASE NOTE: This article was written for XCode 4.6.3 and may be outdated on some parts. See the AppleDoc issue tracker on github for more info.

While developing SimplyStats I had to learn a lot of new stuff, and having integrated help certainly helps in those situations. Apple’s Xcode comes with a good set of documentation for all its classes, and can be accessed right from your code. To look up a keyword, just opt-click and you’ll get all the information you need (now if somebody integrates StackOverflow.com queries in the IDE he’d be my hero).

Wouldn’t it be cool if that was possible for your own static libraries? Well you can! In these days and ages of open source and community development it’s not a strange thing that others will use your excellent coding efforts, so providing a descent help set will certainly be appreciated.The help system for Xcode is called a ‘documentation set’ (or docset for short). Constructing a docset manually is a hell of a job. Nobody wants to construct XML files and references by hand. Fortunately there are quite a few (free!) tools that can extract comments from your code and translate them into neat docsets. There’s appledoc, doxygen and headerdoc just to name a few. I decided to go for appledoc for its simplicity.In this tutorial i will explain the steps necessary to get your code documentation up and running. This is part 1 about installing appledoc and configuration a build target. In part 2 i will explain more about the options and documentation syntax.

(more…)