Universal Links (iOS): Setup & Troubleshooting

Enable Universal Links in minutes with SDDL. You configure Associated Domains in Xcode, and SDDL automatically publishes the required apple-app-site-association file for your domain.

1) Enable Associated Domains

  1. In Xcode, go to Target → Signing & Capabilities → + Capability and add Associated Domains.
  2. Add one or both entries:
    applinks:{YOUR_ID}.sddl.me
    applinks:{your.custom.domain}
  3. Build & install the app on device. Ensure there are no capability warnings.

You do not host AASA yourself — SDDL publishes it for your domain based on your app configuration.

2) Handle links with the SDDL iOS SDK

SwiftUI example:

import SwiftUI
import SDDLSDK

struct ContentView: View {
    var body: some View {
        Color.clear
            .onOpenURL { url in
                SDDLHelper.resolve(url, onSuccess: handlePayload(_:), onError: handleError(_:))
            }
            .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) { activity in
                SDDLHelper.resolve(activity.webpageURL, onSuccess: handlePayload(_:), onError: handleError(_:))
            }
            .onAppear {
                SDDLHelper.resolve(nil, onSuccess: handlePayload(_:), onError: handleError(_:))
            }
    }
}

UIKit lifecycle (optional):

// SceneDelegate.swift
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
    if userActivity.activityType == NSUserActivityTypeBrowsingWeb,
       let url = userActivity.webpageURL {
        SDDLHelper.resolve(url, onSuccess: { payload in /* route */ },
                                onError:   { err in /* handle */ })
    }
}

func scene(_ scene: UIScene, openURLContexts URLContexts: Set) {
    if let url = URLContexts.first?.url {
        SDDLHelper.resolve(url, onSuccess: { payload in /* route */ },
                                onError:   { err in /* handle */ })
    }
}

func sceneDidBecomeActive(_ scene: UIScene) {
    SDDLHelper.resolve(nil, onSuccess: { payload in /* route */ },
                            onError:   { err in /* handle */ })
}

3) Checks & Tips

  • Domains: use {YOUR_ID}.sddl.me or your verified custom domain.
  • After changing entitlements or domains, delete and reinstall the app to refresh Universal Links.
  • AASA is auto-published by SDDL; ensure it’s reachable (no redirects) and served with the correct content type.
  • Implement a cold-start call (SDDLHelper.resolve(nil)) to restore deferred context when the app opens without a URL.

FAQ

Do I need a custom URL scheme?

Not required. Universal Links are preferred on iOS. You may add a scheme as a fallback if your product requires it.

Where do I upload AASA?

You don’t — SDDL publishes it automatically from your app settings.

Related guides

Continue exploring