For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Overview
    • Introduction
    • How it works
    • Quickstart
    • Customer showcase
  • Working with SDKs
    • Project structure
    • Adding custom code
    • Migrating to Replay
    • Capabilities
  • Generators
      • Generating an SDK
      • Publishing as a Swift package
      • Configuration
      • Changelog
  • Reference
    • generators.yml
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
On this page
  • Configure generators.yml
  • Publish as a Swift package
GeneratorsSwift

Publishing as a Swift package

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Generating an SDK

Next

Swift configuration

Publish your public-facing Fern Swift SDK as a Swift package distributed via Git. After following the steps on this page, you’ll have a versioned package that developers can install using Swift Package Manager.

This page assumes that you have:

  • An initialized fern folder, a GitHub repository for your Swift SDK, and a Swift generator group in generators.yml. See Generating an SDK (Swift).

Configure generators.yml

1

Configure output location

Swift packages are distributed via Git repositories, so remove the auto-generated output and config properties. Instead, add the path to your GitHub repository:

generators.yml
1groups:
2 swift-sdk:
3 generators:
4 - name: fernapi/fern-swift-sdk
5 version: 0.35.0
6 github:
7 repository: your-org/company-swift

Publish as a Swift package

At this point, you’re ready to generate a release for your SDK.

1

Generate your release

Regenerate your SDK and publish it to your repository:

$fern generate --group swift-sdk --version <version>

Local machine output will verify that the release is pushed to your repository and tagged with the version you specified.

2

Verify package availability

Your Swift package is now available! Developers can add it to their projects by:

  • In Xcode: File → Add Package Dependencies → Enter your repository URL
  • In Package.swift: Add to dependencies array:
1dependencies: [
2 .package(url: "https://github.com/<github-org>/<github-repo-name>", from: "<version>")
3]

Unlike other languages that rely on centralized registries, Swift packages are available as soon as they’re tagged and pushed to a Git repository.

You can optionally submit your package to the community-maintained Swift Package Index for better discoverability.