# SDK Overview

WarpLink provides native SDKs for all major mobile platforms. Each SDK handles deep link resolution, deferred deep links, and install attribution with zero third-party dependencies.

Every SDK authenticates with an **SDK key**, created in the dashboard under **Keys** > **SDK keys** and pre-scoped for link resolution and install attribution. API keys are for backend scripts, CI, and AI agents, and they cannot record installs. An SDK key can be tied to one app, so a key shipped in one app cannot act as another. Choose the app when you create the key, or pick **Any app**.

## Platform Support

| Platform | Language | Distribution | Min Version | Source |
|----------|----------|-------------|-------------|--------|
| [iOS](https://warplink.app/docs/sdks/ios) | Swift | Swift Package Manager | iOS 15+ | [GitHub](https://github.com/WarpLinkApp/warplink-ios-sdk) |
| [Android](https://warplink.app/docs/sdks/android) | Kotlin | Maven Central | API 26+ | [GitHub](https://github.com/WarpLinkApp/warplink-android-sdk) |
| [React Native](https://warplink.app/docs/sdks/react-native) | TypeScript | npm | RN 0.75+ | [GitHub](https://github.com/WarpLinkApp/warplink-react-native-sdk) |
| [Flutter](https://warplink.app/docs/sdks/flutter) | Dart | pub.dev | Flutter 3.38+ | [GitHub](https://github.com/WarpLinkApp/warplink-flutter-sdk) |

All four SDKs are currently at version 1.4.0. See the [SDK changelog](https://warplink.app/docs/changelog) for what changed and how to upgrade, or the [WarpLink SDK 1.4.0 release post](https://warplink.app/blog/warplink-sdk-1-4-0) for a walkthrough.

## What Each SDK Does

- **Deep link resolution**: Resolves WarpLink short URLs into destination URLs with metadata
- **Universal Links / App Links**: Handles platform-native deep link entry points (cold start and warm start)
- **Deferred deep links**: Matches app installs to link clicks using probabilistic matching and device IDs. On iPhone, [Tether](https://warplink.app/docs/tether) hands the exact link to the app through the clipboard
- **Install attribution**: Reports match type (deterministic/probabilistic) and confidence scores, and credits referral links with an exact invitation match
- **Custom link domains**: You declare the domains you serve links from, so a link on your own domain resolves on the very first launch, with no network round trip

## Opt-Out by Default

A single `configure()` call with an `onLink` callback wires up everything: cold start, warm start, and the deferred deep link check all fire automatically. The one `onLink` sink receives every resolved link, whether it arrived from a tap or from a deferred install match (check `isDeferred` to tell them apart).

Each piece is individually opt-out. Turn off automatic deep link handling or the deferred check with a flag on your options, and drive the flow yourself with the manual methods. You only add code when you want less, not more.

## SDK Design Principles

All WarpLink SDKs follow the same design:

- **Zero dependencies**: No third-party libraries. Only platform APIs.
- **Privacy-first**: No IDFA, no GAID, no cross-app tracking. ATT-exempt on iOS.
- **Main-thread callbacks**: All completion handlers are dispatched to the main thread for safe UI updates.
- **One call, everything wired**: `configure({ apiKey, onLink })` handles cold start, warm start, and deferred attribution. Each is opt-out with a single flag.
- **Cached attribution**: Deferred deep link checks happen once per install. Results are cached locally.

## Quick Comparison

| Feature | iOS | Android | React Native | Flutter |
|---------|-----|---------|--------------|---------|
| Cold + warm deep links | Automatic (SDK delegate or one-liner) | Automatic cold start, `onNewIntent` one-liner for warm start | Automatic once the iOS `AppDelegate` forwards URLs to the SDK | Automatic on both platforms, no host code |
| Deferred check | Automatic on `configure()` | Automatic on `configure()` | Automatic on `configure()` | Automatic on `configure()` |
| Deterministic match | Invitation token, pasted by the person (a first install without one is probabilistic) | Play Install Referrer, and the invitation token inside it | Invitation token on both platforms, Play Install Referrer on Android (bridged) | Invitation token on both platforms, Play Install Referrer on Android (wraps the native SDKs) |
| Referral handoff | `WarpLinkPasteButton`, `claimReferral` | Automatic read, `claimReferral` | `redeemInvitation`, `claimReferral` | `redeemInvitation`, `claimReferral` |
| Probabilistic match | Enriched probabilistic match | Enriched probabilistic match | Enriched probabilistic match | Enriched probabilistic match |
| Debug logging | `[WarpLink]` in Xcode console | `WarpLink` Logcat tag | Same `debugLogging` option, bridged to native console/Logcat output | Same `debugLogging` option, written to the native console/Logcat output |
| Custom link domains | `linkDomains` option, or a `WarpLinkDomains` array in `Info.plist` | `linkDomains` option, or an `app.warplink.DOMAINS` meta-data entry | `linkDomains` option, forwarded to the native SDKs | `linkDomains` option, forwarded to the native SDKs |
