
Official documentation for Amplitude Experiment's Client-side iOS SDK implementation.

{% callout type="info" heading="Unified SDK" %}
Install the [Unified SDK for Swift](/docs/sdks/analytics/ios/unified-sdk) to access the Experiment SDK along with other Amplitude products (Analytics, Session Replay). The Unified SDK provides a single entry point for all Amplitude features and simplifies the integration process by handling the initialization and configuration of all components.
{% /callout %}

## Install

{% callout type="warning" heading="Import statement" %}
CocoaPods and Swift Package Manager/Carthage have different import statements.

- CocoaPods: `import AmplitudeExperiment`
- SPM/Carthage: `import Experiment`
{% /callout %}

{% tabs tabs="CocoaPods, Swift Package Manager" %}
{% tab name="CocoaPods" %}

```ruby
pod 'AmplitudeExperiment', '~> <VERSION>'
```

{% /tab %}
{% tab name="Swift Package Manager" %}

- Package URL: `https://github.com/amplitude/experiment-ios-client`
{% /tab %}
{% /tabs %}

{% callout type="tip" heading="Quick start" %}
The right way to initialize the Experiment SDK depends on whether you use an Amplitude SDK for analytics or a third party (for example, Segment).

{% tabs tabs="Amplitude, Third party" %}
{% tab name="Amplitude" %}

1. [Initialize the experiment client](#initialize)
2. [Fetch variants](#fetch)
3. [Access a flag's variant](#variant)

```swift
// (1) Initialize the experiment client with Amplitude Analytics
let experiment = Experiment.initializeWithAmplitudeAnalytics(
    apiKey: "DEPLOYMENT_KEY",
    config: ExperimentConfigBuilder().build()
)

// (2) Fetch variants
experiment.fetch(user: nil) { error in

    // (3) Lookup a flag's variant
    let variant = experiment.variant("FLAG_KEY")
    if variant.value == "on" {
        // Flag is on
    } else {
        // Flag is off
    }
}
```

{% /tab %}
{% tab name="Third party" %}

1. [Initialize the experiment client](#initialize)
2. [Fetch variants for a user](#fetch)
3. [Access a flag's variant](#variant)

```swift

// (1) Initialize the experiment client and implement a
//     custom exposure tracking provider.
class ExposureTracker: ExposureTrackingProvider {
   func track(exposure: Exposure) {
       // TODO: Implement exposure tracking
       // analytics.track(name: "$exposure", properties: [
       //     "flag_key": exposure.flagKey,
       //     "variant": exposure.variant,
       //     "experiment_key": exposure.experimentKey
       // ])
   }
}
let experiment = Experiment.initialize(
   apiKey: "DEPLOYMENT_KEY",
   config: ExperimentConfigBuilder()
       .exposureTrackingProvider(ExposureTracker())
       .build()
)
// (2) Fetch variants with the user.
let user = ExperimentUserBuilder()
   .userId("user@company.com")
   .deviceId("abcdefg")
   .userProperty("premium", value: true)
   .build()
experiment.fetch(user: user) { error in

   // (3) Lookup a flag's variant
   let variant = experiment.variant("FLAG_KEY")
   if variant.value == "on" {
       // Flag is on
   } else {
       // Flag is off
   }
}
```

{% /tab %}
{% /tabs %}
{% /callout %}

## Initialize

Initialize the SDK client in your application on startup. The [deployment key](/docs/feature-experiment/data-model#deployments) argument you pass to the `apiKey` parameter must live within the same project that you are sending analytics events to.

{% code-group %}
```swift Amplitude
func initializeWithAmplitudeAnalytics(
    apiKey: String,
    config: ExperimentConfig
) -> ExperimentClient
```

```swift Third party
func initialize(apiKey: String, config: ExperimentConfig) -> ExperimentClient
```
{% /code-group %}

- **`apiKey`**
  - **Requirement**: required
  - **Description**: The [deployment key](/docs/feature-experiment/data-model#deployments) that authorizes fetch requests and determines which flags to evaluate for the user.
- **`config`**
  - **Requirement**: optional
  - **Description**: The client [configuration](#configuration) used to customize SDK client behavior.

The initializer returns a singleton instance, so subsequent initializations for the same instance name always return the initial instance. To create multiple instances, use the `instanceName` [configuration](#configuration).

{% code-group %}
```swift Amplitude
let experiment = Experiment.initializeWithAmplitudeAnalytics(
    apiKey: "DEPLOYMENT_KEY",
    config: ExperimentConfigBuilder()
    .instanceName("myCustomInstance")  // case-sensitive name matching your Analytics instance
    .build()
)
```

```swift Third party
// (1) Initialize the experiment client and implement a
//     custom exposure tracking provider.
class ExposureTracker: ExposureTrackingProvider {
    func track(exposure: Exposure) {
        // TODO: Implement exposure tracking
        // analytics.track(name: "$exposure", properties: [
        //     "flag_key": exposure.flagKey,
        //     "variant": exposure.variant,
        //     "experiment_key": exposure.experimentKey
        // ])
    }
}
let experiment = Experiment.initialize(
    apiKey: "DEPLOYMENT_KEY",
    config: ExperimentConfigBuilder()
        .exposureTrackingProvider(ExposureTracker())
        .instanceName("myCustomInstance")  // case-sensitive name matching your Analytics instance
        .build()
)
```
{% /code-group %}

### Configuration

Configure the SDK client during initialization.

{% accordion title="Configuration options" %}
| Name | Description | Default Value |
| --- | --- | --- |
| `debug` | **Deprecated.** When `true`, sets `logLevel` to `.debug`. Use `logLevel` instead. | `false` |
| `logLevel` | The minimum log level to output. Options: `.off` (no logging), `.error` (errors only), `.warn` (errors and warnings), `.log` (errors, warnings, and logs), `.debug` (all messages including debug). Go to [Custom logging](#custom-logging). | `.warn` |
| `loggerProvider` | Custom logger implementation. Must implement the `CoreLogger` protocol. Go to [Custom logging](#custom-logging). | `DefaultLogger()` |
| `fallbackVariant` | The default variant to fall back if a variant for the provided key doesn't exist. | `{}` |
| `initialVariants` | An initial set of variants to access. This field helps bootstrap the client SDK with values rendered by the server using server-side rendering (SSR). | `{}` |
| `serverZone` | Select the Amplitude data center to get flags and variants from, `.US` or `.EU` | `.US` |
| `serverUrl` | The host to fetch variants from. | `https://api.lab.amplitude.com` |
| `flagsServerUrl` | The host to fetch local evaluation flags from. For hitting the EU data center, use `serverZone`. | `https://flag.lab.amplitude.com` |
| `fetchTimeoutMillis` | The timeout for fetching variants in milliseconds. | `10000` |
| `retryFetchOnFailure` | Whether to retry variant fetches in the background if the request doesn't succeed. | `true` |
| `automaticExposureTracking` | If true, calling [`variant()`](#variant) tracks an exposure event through the configured `exposureTrackingProvider`. If no exposure tracking provider is set, this configuration option does nothing. | `true` |
| `fetchOnStart` | If true or nil, always [fetch](#fetch) remote evaluation variants on [start](#start). If false, never fetch on start. | `true` |
| `pollOnStart` | Poll for local evaluation flag configuration updates every minute on [start](#start). | `true` |
| `automaticFetchOnAmplitudeIdentityChange` | Only matters if you use the `initializeWithAmplitudeAnalytics` initialization function to integrate with the Amplitude Analytics SDK. If `true` any change to the user ID, device ID or user properties from analytics triggers the experiment SDK to fetch variants and update its cache. | `false` |
| `userProvider` | An interface used to provide the user object to `fetch()` when called. | `null` |
| `exposureTrackingProvider` | Implement and configure this interface to track exposure events through the experiment SDK, either automatically or explicitly. | `null` |
| `instanceName` | Custom instance name for experiment SDK instance. **The value of this field is case-sensitive.** | `null` |
| `initialFlags` | A JSON string representing an initial set of flag configurations to use for local evaluation. | `undefined` |

{% /accordion %}

{% callout type="info" heading="Eu data center" %}
If you're using Amplitude's EU data center, configure the `serverZone` option on initialization to `.EU`.
{% /callout %}

### Integrations

If you use either Amplitude or Segment Analytics SDKs to track events into Amplitude, you'll want to set up an integration on initialization. Integrations automatically implement [provider](#providers) interfaces to enable a more streamlined developer experience by making it easier to **manage user identity** and **track exposures events**.

{% accordion title="Amplitude integration" %}

The Amplitude Experiment SDK is set up to integrate with the Amplitude Analytics SDK.

```swift
Amplitude.instance().initializeApiKey("API_KEY")
let experiment = Experiment.initializeWithAmplitudeAnalytics( 
    apiKey: "DEPLOYMENT_KEY",
    config: ExperimentConfigBuilder().build()
)
```

If you are using a custom instance name for analytics, set the same value in the `instanceName` [configuration option](#configuration) in the experiment SDK.

The integration initializer configures implementations of the [user provider](#user-provider) and [exposure tracking provider](#exposure-tracking-provider) interfaces to pull user data from the Amplitude Analytics SDK and track exposure events.

**Supported Versions**

All generally available versions of the next-generation [Amplitude Analytics Swift](/docs/sdks/analytics/ios/ios-swift-sdk) SDK support this integration.

| Analytics SDK Version | Experiment SDK Version |
| --------------------- | ---------------------- |
| `8.8.0+`              | `1.6.0+`               |

{% /accordion %}

{% accordion title="Segment integration" %}
Experiment's integration with Segment Analytics must be configured manually. The Experiment SDK must then be configured on initialization with an instance of the exposure tracking provider. Make sure this happens _after_ the analytics SDK has been loaded an initialized.

```swift
class SegmentExposureTrackingProvider : ExposureTrackingProvider {
    private let analytics: Analytics
    init(analytics: Analytics) {
        self.analytics = analytics
    }
    func track(exposure: Exposure) {
        analytics.track("$exposure", properties: [
            "flag_key": exposure.flagKey,
            "variant": exposure.variant,
            "experiment_key": exposure.experimentKey
        ])
    }
}
```

The Experiment SDK must then be configured on initialization with an instance of the exposure tracking provider.

```swift
let analytics = // Initialize segment analytics
ExperimentConfig config = ExperimentConfigBuilder()
    .exposureTrackingProvider(SegmentExposureTrackingProvider(analytics))
    .build()
let experiment = Experiment.initialize(apiKey: "<DEPLOYMENT_KEY>", config: config)
```

When [fetching variants](#fetch), pass the segment anonymous ID and user ID for the device ID and user ID, respectively.

```swift
let userId = SEGState.sharedInstance().userInfo.userId
let deviceId = SEGState.sharedInstance().userInfo.anonymousId

let user = ExperimentUserBuilder()
    .userId(userId)
    .deviceId(deviceId)
    .build()
experiment.fetch(user: user, completion: nil)
```

{% /accordion %}

## Fetch

Fetches variants for a [user](/docs/feature-experiment/data-model#users) and stores the results in the client for fast access. The function [remote evaluates](/docs/feature-experiment/remote-evaluation) the user for flags associated with the deployment used to initialize the SDK client.

```swift
func fetch(user: ExperimentUser?, options: FetchOptions?, completion: ((ExperimentClient, Error?) -> Void)?)
```

| Parameter    | Requirement | Description                                                                                                                                                                                                                                                                                                                                     |
| ------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `user`       | optional    | Explicit [user](/docs/feature-experiment/data-model#users) information to pass with the request to evaluate. The SDK merges this user information with user information provided from [integrations](#integrations) through the [user provider](#user-provider), preferring properties passed explicitly to `fetch()` over provided properties. |
| `options`    | optional    | Explicit flag keys to fetch.                                                                                                                                                                                                                                                                                                                    |
| `completion` | optional    | Callback when the variant fetch (success or failure). If the fetch request fails, the error is returned in the second parameter of this callback.                                                                                                                                                                                               |

Amplitude Experiment recommends calling `fetch()` during application start up so that the user gets the most up-to-date variants for the application session. Furthermore, you'll need to wait for the fetch request to return a result before rendering the user experience to avoid the interface "flickering".

```swift
let user = ExperimentUserBuilder()
    .userId("user@company.com")
    .userProperty("premium", value: true)
    .build()
experiment.fetch(user: user) { experiment, error in
    // Do something...
}
```

If you're using an [integration](#integrations) or a custom [user provider](#user-provider) then you can fetch without inputting the user.

```swift
experiment.fetch(user: nil, completion: nil)
```

{% callout type="tip" heading="Fetch when user identity changes" %}
If you want the most up-to-date variants for the user, it's recommended that you call `fetch()` whenever the user state changes in a meaningful way. For example, if the user logs in and receives a user ID, or has a user property set which may affect flag or experiment targeting rules.

In the case of **user properties**, Amplitude recommends passing new user properties explicitly to `fetch()` instead of relying on user enrichment before [remote evaluation](/docs/feature-experiment/remote-evaluation). Remote user-property sync through a separate system has no timing guarantees for `fetch()`, which can create a race condition.
{% /callout %}

If `fetch()` times out (default 10 seconds) or fails for any reason, the SDK client returns and retries in the background with back-off. You may configure the timeout or disable retries in the [configuration options](#configuration) during SDK client initialization.

{% accordion title="Account-level bucketing and analysis (v1.10.0+)" %}
If your organization has purchased the [Accounts add-on](/docs/analytics/account-level-reporting) you may perform bucketing and analysis on groups rather than users. Reach out to your representative to gain access to this beta feature.

Groups must either be included in the user sent with the fetch request (recommended), or identified with the user through a group identify call from the [Group Identify API](/docs/apis/analytics/group-identify) or through [`setGroup()` from an analytics SDK](/docs/sdks/analytics/browser/browser-sdk-2#user-groups).

```swift
let user = ExperimentUserBuilder()
    .userId(userId)
    .deviceId(deviceId)
    .group("org name", ["Amplitude"])
    .build()
experiment.fetch(user: user, completion: nil)
```

To pass freeform group properties, refer to this example:

```swift
let user = ExperimentUserBuilder()
    .userId(userId)
    .deviceId(deviceId)
    .groupProperty("org name", ["Amplitude"])
    .build()
experiment.fetch(user: user, completion: nil)
```

{% /accordion %}

## Start

{% callout type="info" heading="Fetch vs start" %}
Use `start` if you're using client-side [local evaluation](/docs/feature-experiment/local-evaluation). If you're only using [remote evaluation](/docs/feature-experiment/remote-evaluation), call [fetch](#fetch) instead of `start`.
{% /callout %}

Start the SDK by getting flag configurations from the server and fetching remote evaluation variants for the user. The SDK is ready when the completion callback runs.

```js
func start(_ user: ExperimentUser? = nil, completion: ((Error?) -> Void)? = nil)
```

| Parameter    | Requirement | Description                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `user`       | optional    | Explicit [user](/docs/feature-experiment/data-model#users) information to pass with the request to fetch variants. The SDK merges this user information with user information provided from [integrations](#integrations) through the [user provider](#user-provider), preferring properties passed explicitly to `fetch()` over provided properties. Also sets the user in the SDK for reuse. |
| `completion` | optional    | The completion block, called when the SDK has finished starting. If fetch is called on start, the completion block is called after the fetch response is received.                                                                                                                                                                                                                             |

Call `start()` when your application is initializing, after user information is available to evaluate or [fetch](#fetch) variants. The provided completion block is called after loading local evaluation flag configurations and fetching remote evaluation variants.

Configure the behavior of `start()` by setting `fetchOnStart` in the SDK configuration on initialization to improve performance based on the needs of your application.

- If your application never relies on remote evaluation, set `fetchOnStart` to `false` to avoid increased startup latency caused by remote evaluation.
- If your application relies on remote evaluation, but not right at startup, you may set `fetchOnStart` to `false` and call `fetch()` separately.

{% code-group %}
```swift Amplitude
experiment.start() { error in
    // SDK Started
}
```

```swift Third party
let user = ExperimentUserBuilder()
    .userId("user@company.com")
    .deviceId("abcdefg")
    .userProperty("premium", value: true)
    .build()
experiment.start(user) { error in
    // SDK Started
}
```
{% /code-group %}

## Variant

Access a [variant](/docs/feature-experiment/data-model#variants) for a [flag or experiment](/docs/feature-experiment/data-model#flags-and-experiments) from the SDK client's local store.

{% callout type="info" heading="Automatic exposure tracking" %}
When you use an [integration](#integrations) or set a custom [exposure tracking provider](#exposure-tracking-provider), `variant()` automatically tracks an exposure event through the tracking provider. To disable this functionality, [configure](#configuration) `automaticExposureTracking` to be `false`, and track exposures manually using [`exposure()`](#exposure).
{% /callout %}

```swift
func variant(_ key: String, fallback: Variant? = nil) -> Variant
```

| Parameter  | Requirement | Description                                                                                                                                 |
| ---------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `key`      | required    | The **flag key** to identify the [flag or experiment](/docs/feature-experiment/data-model#flags-and-experiments) to access the variant for. |
| `fallback` | optional    | The value to return if no variant was found for the given `flagKey`.                                                                        |

When determining which variant a user has been bucketed into, you'll want to compare the variant `value` to a well-known string.

```swift
let variant = experiment.variant("<FLAG_KEY>")
if variant.value == "on" {
    // Flag is on
} else {
    // Flag is off
}
```

{% callout type="info" heading="Access the variant's payload" %}
A variant may also be configured with a dynamic [payload](/docs/feature-experiment/data-model#variants) of arbitrary data. Access the `payload` field from the variant object after checking the variant's `value`.

The `payload` in iOS is of type `Any?`, so cast the payload to the expected type to retrieve the value. For example, if the payload is `{"key":"value"}`:

```swift
let variant = client.variant("<FLAG_KEY>")
if variant.value == "on" {
    if let payload = variant.payload as? [String:String] {
        let value = payload["key"]
    }
}
```

{% /callout %}

A `null` variant `value` means that the user hasn't been bucketed into a variant. You may use the built in **fallback** parameter to provide a variant to return if the store doesn't contain a variant for the given flag key.

```swift
let variant = experiment.variant("<FLAG_KEY>", fallback: Variant("control"))
if variant.value == "control" {
    // Control
} else if variant.value == "treatment" {
    // Treatment
}
```

## All

Access all [variants](/docs/feature-experiment/data-model#variants) stored by the SDK client.

```swift
func all() -> [String:Variant]
```

## Clear

Clear all [variants](/docs/feature-experiment/data-model#variants) in the cache and storage.

```swift
func clear()
```

You can call `clear` after user logout to clear the variants in cache and storage.

```swift
experiment.clear()
```

## Exposure

Manually track an [exposure event](/docs/feature-experiment/under-the-hood/event-tracking#exposure-events) for the current variant of the given flag key through configured [integration](#integrations) or custom [exposure tracking provider](#exposure-tracking-provider). Generally used in conjunction with setting the `automaticExposureTracking` [configuration](#configuration) optional to `false`.

```swift
func exposure(key: String)
```

| Parameter | Requirement | Description                                                                                                                                                                                                                        |
| --------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `key`     | required    | The **flag key** to identify the [flag or experiment](/docs/feature-experiment/data-model#flags-and-experiments) variant to track an [exposure event](/docs/feature-experiment/under-the-hood/event-tracking#exposure-events) for. |

```swift
let variant = experiment.variant("<FLAG_KEY>")

// Do other things...

experiment.exposure("<FLAG_KEY>")
if variant.value == "control" {
    // Control
} else if variant.value == "treatment" {
    // Treatment
}
```

## Providers

{% callout type="tip" heading="Integrations" %}
If you use Amplitude or Segment analytics SDKs along side the Experiment Client SDK, Amplitude recommends you use an [integration](#integrations) instead of implementing custom providers.
{% /callout %}

Provider implementations enable a more streamlined developer experience by making it easier to manage user identity and track exposures events.

### User provider

The SDK client uses the user provider to access the most up-to-date user information only when needed (for example, when [`fetch()`](#fetch) is called). The user provider is optional, but helps if you have a user information store already set up in your application. With a user provider, you don't need to manage two separate user info stores in parallel. Separate stores can create divergent user state if the application user store is updated and experiment isn't (or vice versa).

```swift 
protocol ExperimentUserProvider {
    func getUser() -> ExperimentUser
}
```

To use your custom user provider, set the `userProvider` [configuration](#configuration) option with an instance of your custom implementation on SDK initialization.

```swift
let config = ExperimentConfigBuilder()
    .userProvider(CustomUserProvider())
    .build()
let experiment = Experiment.initialize(apiKey: "<DEPLOYMENT_KEY>", config: config)
```

### Exposure tracking provider

Amplitude highly recommends implementing an exposure tracking provider. [Exposure tracking](/docs/feature-experiment/under-the-hood/event-tracking#exposure-events) increases the accuracy and reliability of experiment results and improves visibility into which flags and experiments a user is exposed to.

```swift
protocol ExposureTrackingProvider {
    func track(exposure: Exposure)
}
```

The implementation of `track()` should track an event of type `$exposure` (a.k.a name) with two event properties, `flag_key` and `variant`, corresponding to the two fields on the `Exposure` object argument. Finally, the event tracked must eventually end up in Amplitude Analytics for the same project that the [deployment] used to [initialize](#initialize) the SDK client lives within, and for the same user that variants were [fetched](#fetch) for.

To use your custom user provider, set the `exposureTrackingProvider` [configuration](#configuration) option with an instance of your custom implementation on SDK initialization.

```swift
ExperimentConfig config = ExperimentConfigBuilder()
    .exposureTrackingProvider(CustomExposureTrackingProvider(analytics))
    .build()
let experiment = Experiment.initialize(apiKey: "<DEPLOYMENT_KEY>", config: config)
```

## Bootstrapping

You may want to bootstrap the experiment client with an initial set of flags or variants when variants come from an external source (for example, not from calling `fetch()` on the SDK client). Use cases include [local evaluation](/docs/feature-experiment/local-evaluation) or integration testing on specific variants.

### Bootstrapping variants

To bootstrap the client with a predefined set of variants, set the flags and variants in the `initialVariants` [configuration](#configuration) object, then set the `source` to `Source.InitialVariants` so that the SDK client prefers the bootstrapped variants over any previously fetched & stored variants for the same flags.

```swift
let config = ExperimentConfigBuilder()
    .initialVariants(["<FLAG_KEY>": Variant("<VARIANT>")])
    .source(Source.InitialVariants)
    .build()
let experiment = Experiment.initialize(apiKey: "<DEPLOYMENT_KEY>", config: config)
```

### Bootstrapping flag configurations

You may choose to bootstrap the SDK with an initial set of local evaluation flag configurations using the `initialFlags` configuration. The SDK evaluates these flag configurations when [variant](#variant) is called, unless an updated flag config or variant is loaded with [start](#start) or [fetch](#fetch).

To download initial flags, use the [evaluation flags API](/docs/apis/experiment/experiment-evaluation-api#flags-api)

```swift
let config = ExperimentConfigBuilder()
    .initialFlags("<FLAGS_JSON>")
    .build()
let experiment = Experiment.initialize(apiKey: "<DEPLOYMENT_KEY>", config: config)
```

## Custom logging

Control log verbosity with the `logLevel` configuration, or implement the `CoreLogger` protocol to integrate your own logging solution.

### Log levels

- `.off` - No logging
- `.error` - Errors only
- `.warn` - Errors and warnings (default)
- `.log` - Errors, warnings, and logs
- `.debug` - All messages including debug

```swift
// Only log errors
let config = ExperimentConfigBuilder()
    .logLevel(.error)
    .build()
let experiment = Experiment.initialize(apiKey: "<DEPLOYMENT_KEY>", config: config)
```

### Custom logger

Implement the `CoreLogger` protocol to use your own logging solution:

```swift
// Implement the CoreLogger protocol
class CustomLogger: CoreLogger {
    func error(message: String) {
        // Send error logs to your logging service
        myLoggingService.error(message)
    }

    func warn(message: String) {
        myLoggingService.warn(message)
    }

    func log(message: String) {
        myLoggingService.log(message)
    }

    func debug(message: String) {
        myLoggingService.debug(message)
    }
}

// Initialize with custom logger
let config = ExperimentConfigBuilder()
    .loggerProvider(CustomLogger())
    .logLevel(.warn)
    .build()
let experiment = Experiment.initialize(apiKey: "<DEPLOYMENT_KEY>", config: config)
```
