Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Analytics Swift Quantcast Plugin



Adding the dependency

adding-the-dependency page anchor

Using Xcode

using-xcode page anchor

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 the following repo:

https://github.com/segment-integrations/analytics-swift-integration-quantcast

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

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

1
.package(
2
name: "Segment",
3
url: "https://github.com/segment-integrations/analytics-swift-integration-quantcast.git",
4
from: "1.0.0"
5
),

Using the plugin in your app

using-the-plugin-in-your-app page anchor

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

1
import Segment
2
import SegmentQuantcast // <-- Add this line

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

1
let analytics = Analytics(configuration: Configuration(writeKey: "<YOUR WRITE KEY>")
2
.flushAt(3)
3
.trackApplicationLifecycleEvents(true))
4
analytics.add(plugin: QuantcastDestination())

Your events will now be given Adobe session data and start flowing to Adobe in Cloud Mode.