Analytics Swift Quantcast Plugin
Adding the 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 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.
Using Package.swift
Open your Package.swift file and add the following do your the dependencies
section:
.package(
name: "Segment",
url: "https://github.com/segment-integrations/analytics-swift-integration-quantcast.git",
from: "1.0.0"
),
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.
import Segment
import SegmentQuantcast // <-- Add this line
Just under your Analytics-Swift library setup, call analytics.add(plugin: ...)
to add an instance of the plugin to the Analytics timeline.
let analytics = Analytics(configuration: Configuration(writeKey: "<YOUR WRITE KEY>")
.flushAt(3)
.trackApplicationLifecycleEvents(true))
analytics.add(plugin: QuantcastDestination())
Your events will now be given Adobe session data and start flowing to Adobe in Cloud Mode.
This page was last modified: 10 Apr 2024
Need support?
Questions? Problems? Need more info? Contact Segment Support for assistance!