Universal link not working

I’m seeking guidance on an issue with my iOS app’s universal link for email verification. The link successfully opens my app, but the verification logic never runs.

Here is my setup and the problem details:

  1. Associated Domains & AASA

I have Associated Domains set to applinks:talkio.me in Xcode. The AASA file is located at https://talkio.me/.well-known/apple-app-site-association with the following contents: { "applinks": { "apps": [], "details": [ { "appID": "VMCWZ2A2KQ.com.elbaba.Flake2", "paths": [ "/verify*" ] } ] } }

The direct link we send in the email looks like: https://talkio.me/verify?mode=verifyEmail&oobCode=XYZ&apiKey=ABC

When tapped, the app launches, but the universal link handler code below never logs the URL nor triggers the verifyEmailUsing logic.

  1. SceneDelegate Logic

In my SceneDelegate.swift, I handle universal links in both scene(:willConnectTo:options:) and scene(:continue:userActivity:restorationHandler:):

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // ... if let urlContext = connectionOptions.urlContexts.first { let url = urlContext.url print("SceneDelegate: App launched with URL: (url.absoluteString)") handleUniversalLink(url: url) } }

func scene(_ scene: UIScene, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { print("⚠️ scene(_:continue:) got called!") guard let url = userActivity.webpageURL else { print("No webpageURL in userActivity.") return false } print("SceneDelegate: Universal Link => (url.absoluteString)") handleUniversalLink(url: url) return true }

private func handleUniversalLink(url: URL) { let urlString = url.absoluteString if let oobCode = getQueryParam(urlString, named: "oobCode") { verifyEmailUsing(oobCode) } else { print("No oobCode found => not a verify link.") } } // ...

Expected Log: SceneDelegate: App launched with URL: https://talkio.me/verify?mode=verifyEmail&oobCode=XYZ&apiKey=ABC

However, I only see: SceneDelegate: sceneDidBecomeActive called No mention of the universal link is printed.

Result:

The app opens on tapping the link but does not call handleUniversalLink(...). Consequently, Auth.auth().checkActionCode(oobCode) and Auth.auth().applyActionCode(oobCode) are never triggered.

What I Tried:

Verified the AASA file is served over HTTPS, with content type application/json. Reinstalled the app to refresh iOS’s associated domain cache. Confirmed my Team ID (VMCWZ2A2KQ) and Bundle ID (com.elbaba.Flake2) match in the app’s entitlements. Confirmed the link path "/verify*" matches the link structure in emails.

Despite these checks, the universal link logic is not invoked. Could you help me identify why the link is not recognized as a universal link and how to ensure iOS calls my SceneDelegate methods with the correct URL? Any guidance on diagnosing or resolving this universal link issue would be greatly appreciated.

Thank you for your post. Have you considered troubleshooting the issue? It appears that the format of your AASA file is an outdated format. Instead of using paths, you should use components keys. I recommend upgrading to the latest version of the AASA and following the provided guide:

https://developer.apple.com/documentation/technotes/tn3155-debugging-universal-links

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "VMCWZ2A2KQ.com.elbaba.Flake2",
        "paths": [
          "/verify",
          "/verify/*"
        ]
      }
    ]
  }
}

Additionally, verify the delegates you have registered when opening the application. Review the appearance of the delegates.

https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app

Once you have finalized the new AASA format and registered the delegate, you can utilize the utility to verify whether the links will open the app or not.

sudo swcutil verify …

More information of how to use the swcutil tool in the previously mentioned TechNote: https://developer.apple.com/documentation/technotes/tn3155-debugging-universal-links

Looking forward to hear from you.

Albert Pascual
  Worldwide Developer Relations.

Universal link not working
 
 
Q