Swiftpack.co - appcues/segment-appcues-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by appcues.
appcues/segment-appcues-ios 3.1.0
The Appcues iOS SDK integration with Segment
⭐️ 1
🕓 30 weeks ago
iOS
.package(url: "https://github.com/appcues/segment-appcues-ios.git", from: "3.1.0")

Analytics-Swift Appcues

License: MIT

Add Appcues device mode support to your applications via this plugin for Analytics-Swift

Adding the dependency

Note: the Appcues library itself will be installed as an additional dependency. An installation tutorial video is also available, for reference.

via 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/appcues/segment-appcues-ios

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.

via Package.swift

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

.package(
        url: "https://github.com/appcues/segment-appcues-ios.git",
        from: "3.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 SegmentAppcues // <-- 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: AppcuesDestination())

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

Supporting Builder Preview and Screen Capture

During installation, follow the steps outlined in in the Appcues iOS SDK documentation for Configuring the Appcues URL Scheme. This is necessary for the complete Appcues builder experience, supporting experience preview, screen capture and debugging.

Support

Please use Github issues, Pull Requests, or feel free to reach out to our support team.

GitHub

link
Stars: 1
Last commit: 30 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

3.1.0
30 weeks ago
  • [2023-09-21] ⬆️ Update Appcues dependency version to be a minimum 3.1.0 (9984e1c)

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics