Swift.org Blog Franklin Schrans Oct 13, 2021

Swift DocC Documentation Tool

Article Summary

Franklin Schrans from Apple's Swift-DocC team just announced something iOS developers have been waiting for: Swift-DocC is now open source and cross-platform. Documentation just got a serious upgrade.

Apple's new documentation compiler, announced at WWDC21 and shipped with Xcode 13, is now available as open source with support for macOS and Linux. Swift-DocC lets developers write API docs, long-form articles, and interactive tutorials all alongside their code, then generates beautiful documentation websites automatically.

Key Takeaways

Critical Insight

Swift-DocC brings Apple-quality documentation tooling to the entire Swift ecosystem, making it as easy to build docs as it is to build code.

The architecture reveals some interesting standalone libraries that could power entirely new developer tools beyond documentation.

About This Article

Problem

Developers used to write high-level educational content separately from API documentation. This split meant the educational material was less likely to get written in the first place and would fall out of date quickly.

Solution

Franklin Schrans' team created Swift-DocC to let developers write high-level content right alongside their code. The tool makes it easy to link between API and conceptual docs in a single workflow.

Impact

Swift-DocC works with multiple build systems like SwiftPM and comes built into Xcode 13. This makes it straightforward to generate documentation on both macOS and Linux.