Skip to content

Repository files navigation

WarpLink iOS SDK

CI License: MIT

Deep linking SDK for iOS — resolve Universal Links, handle deferred deep links, and attribute installs with WarpLink.

Requirements

  • iOS 15+
  • Swift 5.9+
  • Xcode 15+

Installation

Swift Package Manager (Xcode)

  1. In Xcode, go to File > Add Package Dependencies...
  2. Enter the repository URL: https://github.com/WarpLinkApp/warplink-ios-sdk
  3. Select Up to Next Major Version and click Add Package

Swift Package Manager (Package.swift)

dependencies: [
    .package(url: "https://github.com/WarpLinkApp/warplink-ios-sdk", from: "1.0.1")
]

Then add "WarpLink" to your target's dependencies:

.target(
    name: "YourApp",
    dependencies: ["WarpLink"]
)

Quick Start

1. Configure the SDK

SwiftUI:

import SwiftUI
import WarpLink

@main
struct MyApp: App {
    init() {
        WarpLink.configure(apiKey: "wl_live_your_api_key_here_abcdefgh")
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

UIKit:

import UIKit
import WarpLink

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        WarpLink.configure(apiKey: "wl_live_your_api_key_here_abcdefgh")
        return true
    }
}

2. Handle Universal Links

SwiftUI:

ContentView()
    .onOpenURL { url in
        WarpLink.handleDeepLink(url) { result in
            switch result {
            case .success(let deepLink):
                // Route to content using deepLink.destination or deepLink.deepLinkUrl
                print("Deep link: \(deepLink.destination)")
            case .failure(let error):
                print("Error: \(error.localizedDescription)")
            }
        }
    }

UIKit (SceneDelegate):

func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
    guard let url = userActivity.webpageURL else { return }

    WarpLink.handleDeepLink(url) { result in
        switch result {
        case .success(let deepLink):
            // Route to content
            print("Deep link: \(deepLink.destination)")
        case .failure(let error):
            print("Error: \(error.localizedDescription)")
        }
    }
}

3. Check for Deferred Deep Links

Call on first launch to check if the user arrived via a link they clicked before installing:

WarpLink.checkDeferredDeepLink { result in
    switch result {
    case .success(let deepLink):
        if let deepLink = deepLink {
            // User came from a WarpLink — route to content
            print("Deferred deep link: \(deepLink.destination)")
        } else {
            // No deferred deep link — show default onboarding
        }
    case .failure(let error):
        print("Error: \(error.localizedDescription)")
    }
}

Features

  • Universal Link Handling — resolve incoming links to destinations and custom parameters. See the Integration Guide.
  • Deferred Deep Links — route users to specific content even after App Store install. See Deferred Deep Links.
  • Install Attribution — deterministic (IDFV) and probabilistic (fingerprint) matching with confidence scores. See Attribution.
  • No ATT Required — uses IDFV (exempt from App Tracking Transparency), no IDFA, no user prompts.
  • Debug Logging — enable with WarpLinkOptions(debugLogging: true) to trace SDK behavior.
  • Zero Dependencies — built entirely on Apple frameworks (Foundation, UIKit).

Documentation

Guide Description
Integration Guide Step-by-step setup from zero to working deep links
API Reference Complete reference for all public types and methods
Deferred Deep Links How deferred deep linking works and how to use it
Attribution Install attribution tiers and confidence scores
Error Handling Every error case with recommended recovery actions
Troubleshooting Common issues and solutions
Firebase Migration Migrate from Firebase Dynamic Links to WarpLink
Architecture How the SDK communicates with the WarpLink platform

Links

License

MIT License. See LICENSE for details.