Xcode, being a very flexible IDE for application development offers embedding custom documentations for your own code. Such documentation should be organized as a so called docset. The best documentation generator available IMHO is Doxygen.
Get a Doxygen well designed, binary Mac distribution of Doxygen at
Doxygen source and binary releases. For the sake of simplicity, I would recommend downloading and installing the universal binary distribution for Mac OS X (.dmg).
Now how to generate a docset using Doxygen? Apple, being a strong supporter of open-source software did release a nice and easy step-by-step tutorial for covering that job.
You find that tutorial at
Using Doxygen to Create Xcode Documentation Sets.
With those tools at hand, you can easily generate docsets automatically when compiling your code.
One thing however that I found a little annoying was the fact that such documentation is always generated when building your code. If I was the lucky owner of a MacPro or a MacbookPro with solid state disk, I would most likely not care. Being a not so lucky user of a pretty dated Macbook, I do however feel the pain of waiting some additional seconds for the sake of getting a new docset generated from my code. But the solution was rather simple, all I needed to do was creating an additional Build-Configuration (named ReleaseDocumentation) and slightly modify the shell-script (Run Script) that Apple has generously provided in their tutorial.
Just add the folowing line at the start of the custom Run Script:
# Run the rest of the script only when ReleaseDocumentation is selected as the
# current active configuration
if [ "$ {CONFIGURATION}" == "ReleaseDocumentation" ]
then
Note that you will have to remove the space between the dollar-sign and the brace - I had to introduce that for keeping this blog happy.
And do not forget to add the following line at the end of that script, just before "exit 0":
fi
After those changes your code will only result into a re/build of the docset when the ReleaseDocumentation configuration is selected.