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:
- 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.
- 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.