Skip to main content
The Tolt Swift package claims a partner’s code for an app user. Tolt then credits that partner with the purchases RevenueCat reports for the same user. See Mobile apps for how it fits together.
Tolt.claimPOST /client/claims Tolt
Sent by the SDK
claimrequest
app_user_id
code
first_seen_at
In Tolt
customercus_7Lm2…
customer_id
partner
statuslead

Install

Add the package in Xcode under File → Add Package Dependencies, or in Package.swift:
Package.swift
It supports iOS 15 and macOS 12 and later, and has no dependencies.

Configure

Call configure once at launch with your public key from Settings → Integrations in the dashboard. The SDK remembers the first launch, which the program’s claim window counts from.
App.swift

Claim a code

Claim the code when the user enters one. Pass the app user id you give RevenueCat.
Swift
Also store the code on the RevenueCat customer. If a purchase reaches Tolt before the claim, Tolt uses it to credit the partner.
Swift
When a partner app link opens your app with tolt_click or tolt_code in the URL, pass the URL on. It returns nil for links without either.
Swift
With a deep linking provider, read the click from its callback instead and call Tolt.claim(clickId:appUserId:).

Results and errors

claim returns a ClaimResult with a status: It throws a ToltError: