Skip to main content
This is the recommended way to integrate without the SDK on iOS. You add one Swift file, configure your token, and call typed methods that mirror the SDK. The client collects device signals, manages the install instance ID, applies SKAdNetwork conversion values, and retries failed requests.
No third-party dependencies are needed. The client uses URLSession and Apple frameworks (AdSupport, AppTrackingTransparency, AdServices, StoreKit). It targets iOS 15 and above.

1. Configure Info.plist

To collect the IDFA, add a tracking usage description. Without it, iOS will not show the App Tracking Transparency prompt and the IDFA stays empty.

2. Add the client

Create LinkrunnerClient.swift. It authenticates with your project token in the request body.

3. Initialize and read attribution

Call configure once, then initialize, then poll attributionData.
To collect the IDFA, call await LinkrunnerClient.shared.requestTrackingAuthorization() when the app is active (for example after your first screen appears), not during launch. The IDFA improves matching but is optional.

4. Identify the user

Call signup when the user signs up or logs in. Events and payments are only stored for attributed users.

5. Track events and payments

Add amount as a number in event or payment data to enable revenue sharing with Google and Meta.

Other endpoints

SKAdNetwork

init, signup, capture-event, and capture-payment responses can include a conversion value (fine_conversion_value, coarse_conversion_value, lock_postback). The client applies it automatically through applySKAN, which calls SKAdNetwork.updatePostbackConversionValue. You do not need to manage conversion values yourself. See Collecting device data for how this fits with Apple’s attribution.

Retries and idempotency

The client retries failed requests up to 3 times with exponential backoff (1s, 2s, 4s). It retries on network errors and on HTTP 408, 429, and 5xx. Other responses, such as 400 or 401, are not retried. A retry can send the same request twice if the first attempt reached the server but the response was lost. How that is handled depends on the endpoint:
paymentId is required for capturePayment, and a unique value ensures retries cannot double count revenue. Events have no server-side deduplication, so if exact event counts matter, disable retries for those calls.

Troubleshooting

Make sure initialize ran on the device, not your backend. For Apple Search Ads, confirm adservices_attribution_token is present in device_data. The IDFA helps but only after the user grants App Tracking Transparency. See Collecting device data.
The IDFA is only available after the user authorizes tracking. Add NSUserTrackingUsageDescription and call requestTrackingAuthorization() while the app is active.
Events and payments are only stored for attributed users. Call signup first, and use the same install_instance_id everywhere.
You are likely calling from your backend. The server matches on the calling IP, so calls must come from the user’s device.
Need help? Contact support@linkrunner.io