# Swift

> How to add the Dub iOS SDK to your Swift project

import DubSwiftInstall from "/snippets/dub-client-ios-install.mdx";
import DubAnalyticsParams from "/snippets/dub-analytics-params-react.mdx";
import DubClientInstallVerify from "/snippets/dub-client-install-verify.mdx";

## Prerequisites

Before you get started, make sure you have the following:

1. Obtain your [publishable key](/docs/api-reference/authentication#publishable-keys) (`DUB_PUBLISHABLE_KEY`) from your [workspace's Tracking settings page](https://app.dub.co/settings/tracking).
2. You would also want to have your [custom domain](https://app.dub.co/settings/domains) (`DUB_DOMAIN`) handy as well.
3. (Optional) If you plan to track conversions, make sure to [enable conversion tracking for your links](/docs/quickstart/server#step-1-enable-conversion-tracking-for-your-links).

## Quickstart

This quick start guide will show you how to get started with Dub iOS SDK in your Swift project.

<DubSwiftInstall />

## Examples

Here are some open-source code examples that you can reference:

<CardGroup cols={2}>
  <Card
    title="Swift (SwiftUI)"
    icon="github"
    href="https://github.com/dubinc/dub-ios/tree/main/Examples/SwiftUI"
    color="#333333"
  >
    See the full example on GitHub.
  </Card>
  <Card
    title="Swift (UIKit)"
    icon="github"
    href="https://github.com/dubinc/dub-ios/tree/main/Examples/UIKit"
    color="#333333"
  >
    See the full example on GitHub.
  </Card>
</CardGroup>
