How to use the Linkrunner SDK in your iOS app
AppDelegate
or SceneDelegate
:
You can find your project token here.
Note: The initialization method doesn’t return any value. To get attribution data and deeplink information, use the getAttributionData
method.
secretKey
: A unique secret key used for request signing and authenticationkeyId
: A unique identifier for the key pair used in the signing processsignup
method once after the user has completed your app’s onboarding process:
It is strongly recommended to use the integrated platform’s identify function to set a persistent user_id once it becomes available (typically after signup or login).
getAttributionData
function:
setUserData
each time the app opens and the user is logged in:
setAdditionalData
to add CleverTap ID to the SDK:
amount
parameter as a number in your custom event data. This allows the ad networks to optimize campaigns based on the revenue value of conversions:
amount
parameter is passed as a number (Double
or Int), not as a string.Function | Where to Place | When to Call |
---|---|---|
LinkrunnerSDK.shared.initialize | App initialization | Once when app starts |
LinkrunnerSDK.shared.getAttributionData | Attribution data handling flow | Whenever the attribution data is needed |
LinkRunner.getInstance().setAdditionalData | Integration code | When third-party integration IDs are available |
LinkrunnerSDK.shared.signup | Onboarding flow | Once after user completes onboarding |
LinkrunnerSDK.shared.setUserData | Authentication logic | Every time app opens with logged-in user |
LinkrunnerSDK.shared.triggerDeeplink | After navigation init | Once after your navigation is ready to handle deep links |
LinkrunnerSDK.shared.trackEvent | Throughout app | When specific user actions occur |
LinkrunnerSDK.shared.capturePayment | Payment processing | When user makes a payment |
LinkrunnerSDK.shared.removePayment | Refund flow | When payment needs to be removed |