Sitemap
Code with me

Everything connected with iOS. Follow us

DocC

2 min readNov 27, 2023

--

DocC produces rich API reference documentation and interactive tutorials for our framework or package.

The DocC documentation compiler converts Markdown-based text into rich documentation for Swift frameworks and packages.

Get Mouna’s stories in your inbox

Join Medium for free to get updates from this writer.

You can preview the documentation in its published form as you work on it, and also host it on a website when it’s complete.

Why DocC ?

  • Developers are used to using it since it matches Apple API docs.
  • More detailed docs.
  • Can add Tutorials.
  • Easy to generate.
  • Support GitHub Pages integration.

How to build and archive documentation?

Manually:

  • To compile the documentation, we have to build the project. DocC consumes that information and compiles the documentation into a DocC Archive.
  • This process repeats for every framework or package your target depends on.
Press enter or click to view image in full size

To build documentation manually, choose Product > Build Documentation. DocC compiles the documentation and opens it in Xcode’s documentation viewer.

From command line:

xcodebuild docbuild
-scheme scheme
-derivedDataPath OUTPUT
-destination 'platform=iOS Simulator,name=iPhone 13'

Host the documentation on a server

  • You can share your generated documentation, either directly with Xcode users who open it in the documentation viewer, or by hosting it on a website.
  • If you are fan with github, you can deploy the generated doc to GitHub Pages.

--

--