The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Versioned DocC Documentation


UPDATE: The information in this blog post is superceded by our official documentation. Please refer to the documentation rather than this blog post.

We rolled out auto-generating, auto-hosting, and auto-updating DocC documentation exactly two months ago, and here we are again with more documentation-focused news!

Opting into this feature was simple for package authors with a quick amendment to the package’s .spi.yml file telling us what targets/platforms to use for the documentation generation process. We handled everything else from there, and a “Documentation” link automatically appears for every opted-in package.

We’re delighted to say that this feature has been a great success, and we now have over a hundred packages that have chosen to host documentation with us. That’s amazing!

We have some good news for those 103 package authors today. You made the right choice because you now automatically get versioned documentation, too!

We initially generated documentation for the default branch of a package. It was the easiest way for us to build the feature and a good first step, but versioned documentation is what we were aiming for.

When you use a package, you’d typically use the latest tagged release, so we should show documentation generated from that release by default. As of today, that’s what happens:

Package documentation showing a tagged release in the breadcrumb bar at the top of the page.

We continue to generate documentation for the default branch, and we’ll keep archived documentation available for every major version as packages evolve. Hover over the release to switch to the documentation for a different release or for the default branch:

Package documentation showing a drop-down menu with both the latest tagged release and the default branch version.

We also moved the selector for packages that generate multiple documentation archives for one package:

Package documentation showing a drop-down menu with multiple documentation archives generated from one package.

Why not check out the feature with one of the documented packages? In alphabetical order, you can pick from AdvancedList, AgoraUIKit_iOS, AnimationPlanner, AnyAsyncSequence, AnyLint, AnyMeasure, apnswift, AppFoundation, AppStorage, Boutique, Buildkite, bytes, CalendarKit, CameraControlARView, CertificateSigningRequest, CombineCoreBluetooth, composable-effect-identifier, Compute, ConcurrencyPlus, CryptoSwift, CurrencyConverter, CustomRepeatDate, DesignReviewer, Dflat, EffectsLibrary, Epoxy, FileSystemEventPublisher, FocusEntity, GatheredKit, GeoJSONKit, gis-tools, HandySwift, HandyUIKit, KeyboardShortcuts, KeyboardToolbar, Kingfisher, LeftPad, Lindenmayer, LocationFormatter, Lottie, Media, MeshGenerator, Microya, MonthYearWheelPicker, mqtt-nio, MuJoCo, mvt-tools, NetworkReachability, OperationPlus, ParseSwift, PianoRoll, Pioneer, postgres-nio, Pretty, PrettyLog, reactiveswift-composable-architecture, RevenueCat, Runestone, Saga, ScaledFont, SceneKitDebugTools, Script.swift, secp256k1, SemanticVersion, SemanticVersioningKit, Server, SGPKit, SmoothGradient, SpanGrid, Squirrel3, Steam, StoreFlowable, StreamChat, StreamChatSwiftUI, StreamChatVapor, Stytch, swift-bundler, swift-case-paths, swift-composable-architecture, swift-confidential, swift-markdown, swift-multipart-formdata, swift-parsing, swift-url-routing, swift-xml-parser, SwiftDocC, SwiftInspector, SwiftPlantUML, SwiftProtobuf, swiftui-cached-async-image, SwiftUICharts, SwiftUnits, SwiftVizScale, SwiftyProvisioningProfile, TGCardViewController, UnsplashFramework, Updeto, URLCompatibilityKit, vapor-routing, WeakReference, XCSnippets, Yams, or YMatterType! Phew! 😅

We hope everyone loves this feature, and if you want to generate docs for your package, instructions are in the launch blog post.


About this blog

The Swift Package Index is a search engine and metadata index for Swift packages. Our main goal is to help you make better decisions about the dependencies you include in your apps and projects. If you're new here, the best place to get started is by searching for packages.