Installation
In the XcodeFile
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/userpilot/segment-userpilot-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.
or using Package.swift
Open your Package.swift file and add the following do your the dependencies
section, and replace the <latest_version>
with the latest release version.Check Userpilot iOS SDK for more details.
Initialization
Just under your Analytics-Swift library setup, callanalytics.add(plugin: ...)
to add an instance of the plugin to the Analytics timeline.
Userpilot SDK callbacks
To gain full control and utilize the full capabilities of the Userpilot SDK, you can configure it using theUserpilotDestination
initializer with a configuration lambda.
For example, to handle Userpilot deep links, assign a class as the navigationDelegate
and conform to the UserpilotNavigationDelegate
protocol to manage navigation events triggered by the SDK: