***
title: Swift quickstart
description: >-
Learn how to generate a Swift SDK with Fern. Step-by-step guide to configure
generators.yml and create client libraries for your API.
--------------------------------------------------------
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see [https://buildwithfern.com/learn/llms.txt](https://buildwithfern.com/learn/llms.txt). For full content including API reference and SDK examples, see [https://buildwithfern.com/learn/llms-full.txt](https://buildwithfern.com/learn/llms-full.txt).
Generate a Swift SDK by following the instructions on this page.
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see [https://buildwithfern.com/learn/llms.txt](https://buildwithfern.com/learn/llms.txt). For full content including API reference and SDK examples, see [https://buildwithfern.com/learn/llms-full.txt](https://buildwithfern.com/learn/llms-full.txt).
This page assumes that you have:
* An initialized `fern` folder. See [Set up the `fern`
folder](/sdks/overview/quickstart).
* A GitHub repository for your SDK. See [Project Structure](/sdks/overview/project-structure).
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see [https://buildwithfern.com/learn/llms.txt](https://buildwithfern.com/learn/llms.txt). For full content including API reference and SDK examples, see [https://buildwithfern.com/learn/llms-full.txt](https://buildwithfern.com/learn/llms-full.txt).
### Pass `fern check`
Run `fern check` to ensure that your API definition is valid. If there are any errors,
fix them before proceeding.
If you're using an OpenAPI Specification, check out all of our
[supported extensions](/learn/api-definition/openapi/extensions).
### Add the SDK generator
Run the following command to add the Swift SDK generator to `generators.yml`:
```bash
fern add fern-swift-sdk --group swift-sdk
```
`swift-sdk` is the name of the `generators.yml` group that configures your Swift
SDK's output location and other metadata. You can customize this group name to
differentiate between multiple SDKs across different languages (e.g.,
`ruby-sdk`, etc) in your organization.
This command adds the following `group` to `generators.yml`:
```yaml title="generators.yml"
swift-sdk: # group name
generators:
- name: fernapi/fern-swift-sdk
version: 0.27.0
output:
location: local-file-system
path: ../sdks/swift
```
### Generate the SDK
Run the following command to generate your SDK:
```bash
fern generate --group swift-sdk
```
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see [https://buildwithfern.com/learn/llms.txt](https://buildwithfern.com/learn/llms.txt). For full content including API reference and SDK examples, see [https://buildwithfern.com/learn/llms-full.txt](https://buildwithfern.com/learn/llms-full.txt).
This creates a `sdks` folder in your current directory. The resulting folder structure looks like this: