Native Swift SDK for iOS deep linking. Universal Links with automatic AASA hosting, deferred deep linking, and install attribution. Supports UIKit and SwiftUI.
In Xcode: File → Add Package Dependencies → Enter the repository URL:
https://github.com/nicklausmonroe/ulink-ios-sdkapplinks:yourapp.ulink.lyimport ULink
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
ULink.configure(apiKey: "your-api-key")
return true
}
func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
if let url = userActivity.webpageURL {
ULink.handleLink(url) { link in
// Route user based on link.path and link.parameters
}
return true
}
return false
}
}import SwiftUI
import ULink
@main
struct MyApp: App {
init() {
ULink.configure(apiKey: "your-api-key")
}
var body: some Scene {
WindowGroup {
ContentView()
.onOpenURL { url in
ULink.handleLink(url) { link in
// Route user based on link
}
}
}
}
}// Call on first launch to get link from pre-install click
ULink.getInitialLink { link in
guard let link = link else { return }
// User came from a link before installing
let referralCode = link.parameters["ref"]
let productId = link.parameters["product"]
// Navigate to appropriate content
}Universal Links are Apple's native deep linking mechanism. When properly configured, tapping a Universal Link opens your app directly without showing a browser.
iOS 17 introduced Link Tracking Protection in Safari and Mail. ULink is designed to work with these privacy features. For best results, avoid URL parameters that look like tracking IDs (e.g., fbclid, gclid). Use ULink's built-in parameter encoding instead.
Deferred deep linking preserves link context when a user doesn't have your app installed. ULink stores the link data and delivers it after the user installs and opens your app.
Create a free account and get your API key. Most teams integrate in under 30 minutes.