---
title: Verify Unified SDK for Swift events
description: "Check that the Unified SDK for Swift set up Feature Experiment and Session Replay, turn on debug logging, and trace an analytics event from capture to Amplitude with the iOS Swift SDK verification steps."
product: analytics
lang: en
last_updated: 2026-11-05
token_estimate: 1309
---
# Verify Unified SDK for Swift events

The Unified SDK for Swift sends analytics events through the bundled iOS Swift SDK. An analytics event moves through the same four stages as in the iOS Swift SDK: captured, transformed, sent, and received. This page covers the checks specific to the Unified SDK, starting with setup, and links to the iOS Swift SDK steps for the other stages.

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

| Stage | Question | Where to look |
| --- | --- | --- |
| [Initialized](#check-that-each-product-initialized) | Did the initializer set up every product you use? | The `experiment` and `sessionReplay` properties |
| Captured | Did the SDK accept the call? | [Debug logs](https://amplitude.com/docs/sdks/analytics/ios/ios-swift-sdk/verify-events#check-what-the-sdk-captured) |
| Transformed | What did plugins add, change, or drop? | [An inspection plugin](https://amplitude.com/docs/sdks/analytics/ios/ios-swift-sdk/verify-events#check-how-plugins-transformed-the-event) |
| [Sent](#check-what-the-sdk-sent) | Did the request leave the device, and with what body? | The debug log and the `library` field |
| Received | Did Amplitude accept and store the event? | [The upload result and User Lookup](https://amplitude.com/docs/sdks/analytics/ios/ios-swift-sdk/verify-events#check-what-amplitude-received) |

For problems common to every Amplitude SDK, go to [SDK troubleshooting and debugging](https://amplitude.com/docs/sdks/sdk-debugging). For changes between versions, go to the [`AmplitudeUnified` changelog](https://github.com/amplitude/AmplitudeUnified-Swift/blob/main/CHANGELOG.md).

## Turn on debug logging

In Swift, the Unified initializer has no log level option. The initializer always sets the logger to `warn`, even when you pass `ConsoleLogger(logLevel:)` with a different level. Raise the level on the logger after you create the instance:

#### Swift

```swift
let amplitude = Amplitude(apiKey: "YOUR_API_KEY")
amplitude.configuration.loggerProvider.logLevel = LogLevelEnum.debug.rawValue
```

If you set `amplitude.configuration.logLevel` after initialization, the change has no effect. Set `loggerProvider.logLevel` instead.

#### Objective-C

```objc
AMPAnalyticsConfig *analyticsConfig = [[AMPAnalyticsConfig alloc] init];
analyticsConfig.logLevel = AMPLogLevelDEBUG;
```

Pass `analyticsConfig` to the full initializer. To receive the messages in your own code instead of the console, pass a block as `logger:`:

```objc
logger:^(NSInteger logLevel, NSString *logMessage) {
    NSLog(@"%@", logMessage);
}
```

The SDK writes its messages with `os_log`, under the subsystem `Amplitude` and category `Logging`. Debug output includes lines such as `Start flushing 1 events` and `Successfully completed request`. For what each message means, go to [Turn on debug logging](https://amplitude.com/docs/sdks/analytics/ios/ios-swift-sdk/verify-events#turn-on-debug-logging) in the iOS Swift SDK. Return the level to `warn` before you ship.

## Check that each product initialized

Check each product through its property on the instance:

```swift
let amplitude = Amplitude(
    apiKey: "YOUR_API_KEY",
    sessionReplayConfig: SessionReplayPlugin.Config(sampleRate: 1.0)
)

print(amplitude.experiment != nil)    // true
print(amplitude.sessionReplay != nil) // true on iOS
```

| Product | Request | When |
| --- | --- | --- |
| Feature Experiment | `api.lab.amplitude.com/sdk/v2/vardata` (`api.lab.eu.amplitude.com` for EU) | Only after you call `fetch()` |
| Session Replay | Amplitude Session Replay hosts, for remote configuration and recorded sessions | While a session records |

`amplitude.experiment` returns `nil` when the instance has more than one Feature Experiment plugin. Go to [Read the Experiment client](https://amplitude.com/docs/sdks/analytics/ios/unified-sdk/reference#experiment).

While Session Replay records, every event the SDK sends carries an `[Amplitude] Session Replay ID` event property. If events lack that property, Session Replay isn't recording. Confirm that `sampleRate` is above `0`, and look for this warning, which means the SDK couldn't fetch the Session Replay remote configuration: `[SessionReplay] Remote Config unavailable; keeping the current targeting state.`

## Check what the SDK sent

Each Unified SDK event has a `library` field with two parts:

```json
{
  "event_type": "Sign Up Clicked",
  "library": "amplitude-swift-unified/0.0.0-amplitude-swift/1.19.4"
}
```

The first part, `amplitude-swift-unified/0.0.0`, marks the event as sent through the Unified SDK. Its version is always `0.0.0`, whichever `AmplitudeUnified` version you install. The second part, `amplitude-swift/1.19.4`, is the bundled iOS Swift SDK version. Use the second version when you compare behavior against the [iOS Swift SDK release notes](https://amplitude.com/docs/sdks/analytics/ios/ios-swift-sdk-release-notes).

For the request body, the upload endpoint, and how to see the request, go to [Check what the SDK sent](https://amplitude.com/docs/sdks/analytics/ios/ios-swift-sdk/verify-events#check-what-the-sdk-sent) in the iOS Swift SDK.

