2 min read
The Swift SDK adds the Footprint onboarding flow to your iOS app.
Minimum version requirements
Set your app's minimum deployment target to iOS 14.0 or later.
Installation
Swift Package Manager
Add the Footprint package to the dependencies in your Package.swift:
swift1dependencies: [
2 .package(url: "https://github.com/onefootprint/Swift-Onboarding-Components", from: "<VERSION>")
3]
<VERSION> with the version you want to use from the Swift Package Index. Use the latest release for a new integration.
You can also install Footprint through the Swift Package Index, or in Xcode through File > Add Package Dependencies... by searching for "Footprint".
CocoaPods
Add FootprintOnboardingComponents to your Podfile:
ruby1pod 'FootprintOnboardingComponents', :git => 'https://github.com/onefootprint/Swift-Onboarding-Components.git'
Device intelligence
The SDK can collect device signals through Fingerprint, a third-party provider. Add its optional product if your playbook uses device intelligence rules. Onboarding can complete without it. If your app already bundles Fingerprint, you can leave it out to avoid a duplicate native framework.
To collect and send the signals with Swift Package Manager, add the FootprintDeviceIntelligence library to your target alongside Footprint. With CocoaPods, add the subspec to your Podfile:
ruby1pod 'FootprintOnboardingComponents/DeviceIntelligence', :git => 'https://github.com/onefootprint/Swift-Onboarding-Components.git'
Then register it once before onboarding. With CocoaPods, the subspec builds into the Footprint module, so import Footprint instead:
swift1import FootprintDeviceIntelligence
2
3registerFootprintDeviceIntelligence()
Next steps
- Onboarding starts an onboarding from your app and handles the onboarding ID it returns.