iOS SDK

The Clippr iOS SDK provides deep linking and mobile attribution for native iOS apps built with Swift.

Features

  • Universal Link handling
  • Deferred deep linking (attribution after install)
  • Probabilistic matching via device fingerprinting
  • Event and revenue tracking
  • Programmatic short link creation
  • Swift async/await and completion handler APIs
  • Debug mode for development

Requirements

  • iOS 13.0+
  • Swift 5.7+
  • Xcode 14.0+

Quick Start

swift
import ClipprSDK

// Initialize in your App or AppDelegate
@main
struct MyApp: App {
    init() {
        Clippr.initialize(apiKey: "YOUR_API_KEY")
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
                .onOpenURL { url in
                    Clippr.handleUniversalLink(url)
                }
        }
    }
}

// Handle deep links in your view
struct ContentView: View {
    var body: some View {
        NavigationStack {
            // Your content
        }
        .task {
            if let link = await Clippr.getInitialLink() {
                handleDeepLink(link)
            }

            Clippr.onLink = { link in
                handleDeepLink(link)
            }
        }
    }

    func handleDeepLink(_ link: ClipprLink) {
        print("Path: \(link.path)")
        print("Campaign: \(link.attribution?.campaign ?? "none")")
    }
}

Documentation

Firebase Dynamic Links Clippr
DynamicLinks.dynamicLinks().handleUniversalLink() Clippr.handleUniversalLink()
DynamicLinks.dynamicLinks()?.dynamicLink(fromCustomSchemeURL:) Clippr.handleUniversalLink()

See the Migration Guide for a complete walkthrough.

Source Code

The iOS SDK is open source and available on GitHub:

github.com/nexlabstudio/clippr-ios-sdk

Support