Description of your new file.
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/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.analytics.add(plugin: ...)
to add an instance of the plugin to the Analytics timeline.
UserpilotDestination
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: