---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/segment/connections/sources/catalog/libraries/mobile/apple/destination-plugins/survicate-swift#article
headline: Analytics Swift Survicate Plugin
description: Add Survicate device-mode support to your Analytics-Swift app with this destination plugin to send Identify, Track, Screen, and Reset events.
url: https://www.twilio.com/docs/segment/connections/sources/catalog/libraries/mobile/apple/destination-plugins/survicate-swift
inLanguage: en
dateModified: 2026-06-10T17:20:06.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Analytics Swift Survicate Plugin

[Survicate](https://survicate.com/) is an all-in-one customer feedback platform that helps you collect and act on feedback from your customers. It helps you understand your customers and improve their experience with your product or service.

Add Survicate device-mode support to your applications using this plugin for [Analytics-Swift](https://github.com/segmentio/analytics-swift).

## Adding the dependency

When you add the Analytics Swift Survicate Plugin, the Survicate library is installed as an additional dependency.

### Using Xcode

In the Xcode **File** menu, click **Add Packages**. You'll see a dialog where you can search for Swift packages. In the search field, enter the URL to this repo:

[https://github.com/survicate/analytics-swift-survicate.git](https://github.com/survicate/analytics-swift-survicate.git)

You'll then have the option to pin to a version or specific branch, and select which project in your workspace to add it to. Once you've made your selections, click the **Add Package** button.

### Using Package.swift

Open your Package.swift file and add the following to your the `dependencies` section:

```swift
.package(
name: "SurvicateDestination",
url: "https://github.com/survicate/analytics-swift-survicate.git",
from: "3.0.2"
),
```

```swift
import Segment
import SurvicateDestination // <-- Add this line
```

## Using the plugin in your app

Open the file where you setup and configure the Analytics-Swift library. Add this plugin to the list of imports.

Under your Analytics-Swift library setup, call `analytics.add(plugin: ...)` to add an instance of the plugin to the Analytics timeline.

Your events will now begin to flow to Survicate in device mode.

### Using the SurvicateDestination plugin

#### Identify

In the SurvicateDestination plugin, the Identify event from Segment is transferred to the setUserTrait method of Survicate. This is achieved within the identify function of the SurvicateDestination class. The traits and userId from the Identify event are extracted and set as user traits in Survicate using the setUserTrait method. The traits are a dictionary where each key-value pair is set as a user trait. The userId is also set as a user trait with the key "userId".

#### Track

The SurvicateDestination plugin maps the Segment Track method to the `invokeEvent` method in Survicate. When you track an event in Segment, it's invoked in Survicate.

#### Screen

The SurvicateDestination plugin maps the Segment Screen method to the `enterScreen` method in Survicate. When you track a screen in Segment, it's entered in Survicate.

#### Reset

The SurvicateDestination plugin maps the Segment Reset method to the `reset` method in Survicate. When you reset the user in Segment, it's reset in Survicate.
