<!--
{
  "documentType" : "article",
  "framework" : "Xcode",
  "identifier" : "/documentation/Xcode/writing-documentation",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Writing documentation"
}
-->

# Writing documentation

Produce rich and engaging developer documentation for your apps, frameworks, and packages.

## Overview

The DocC documentation compiler converts Markdown-based text into rich documentation for Swift and Objective-C frameworks, packages, and apps to display in Xcode’s documentation window or host on a website.

DocC syntax — called documentation markup — is a custom variant of Markdown that adds functionality for developer documentation-specific features, like cross-symbol linking, term-definition lists, code listings, and asides. You add documentation markup to your source code, use Xcode’s Build Documentation feature to compile it with DocC, and produce reference documentation for your APIs. You can also use documentation markup, along with a set of directives that instruct how DocC generates your content, to offer step-by-step tutorials that teach developers to use your APIs through interactive coding exercises.

For a deeper understanding of DocC and guidance on its usage, please consult the
DocC documentation available at [DocC Swift.org](https://www.swift.org/documentation/docc).

![On the left, a diagram shows a blocked-out example of a compiled tutorial and Markdown. In the middle, a diagram shows a blocked-out example of Markdown. On the right, a diagram shows a blocked-out example of compiled developer documentation.](images/com.apple.Xcode/docc-hero@2x.png)

## Topics

### Essentials

[Documenting apps, frameworks, and packages](/documentation/Xcode/documenting-apps-frameworks-and-packages)

Create developer documentation from in-source comments, add articles with code snippets,
and add tutorials for a guided learning experience.

### Documentation content

[Writing symbol documentation in your source files](/documentation/Xcode/writing-symbol-documentation-in-your-source-files)

Add reference documentation to your symbols that explains how to use them.

[Adding supplemental content to a documentation catalog](/documentation/Xcode/adding-supplemental-content-to-a-documentation-catalog)

Include articles and extension files to extend your source documentation comments or provide supporting conceptual content.

[SlothCreator: Building DocC documentation in Xcode](/documentation/Xcode/slothcreator-building-docc-documentation-in-xcode)

Build DocC documentation for a Swift package that contains a DocC Catalog.

### Structure and formatting

[Adding structure to your documentation pages](/documentation/Xcode/adding-structure-to-your-documentation-pages)

Make symbols easier to find by arranging them into groups and collections.

### Distribution

[Distributing documentation to other developers](/documentation/Xcode/distributing-documentation-to-other-developers)

Share your documentation directly with Xcode users or host it on a web server.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)