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.
Universal Links
RSS for tagAllow your users to intelligently follow links to content in your app or to your website using universal links.
Posts under Universal Links tag
84 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I have an iOS app where the universal links are not working. Basically, I have double-checked the AASA file, and it's formatted correctly. It's in the right location .well-known subdirectory. I have checked other things as well.
For my app, if the user has forgotten their password, they click on the Forgot Password option, which sends them an email, after which they click on a link; the link should open the iOS app, but is instead opening up the web browser. The format of the link matches the formatting in the AASA file. As well, I've checked associated domains as well.
Using Postman, I can see that the AASA file is accessible.
I have a feeling that the iOS app cannot fetch the AASA file, as I don't see any relevant swcd logs.
My AASA file is located at:
https://www.COMPANY_NAME.ca/.well-known/apple-app-site-association
Please advise.
I have two standalone app written for watchos (standalone). One to authenticate and one for connectivity to real-world devices. The connectivity app uses the authentication app before every action, Im testing this with two xcode projects I have created and tried different things ended up with this error.
authapp://authenticate?callback=linkingapp://callback
-[SPApplicationDelegate extensionConnection:openSystemURL:]:2418: URL with scheme "authapp" not supported
how to get the url scheme working? Tested this in simulator and real device. info.plist and AppDelegate files are placed in both apps.
Hello all,
I am trying to build a Flutter app that supports a link the opens the app.
I would like the link to be sent by email, and when clicked I would like to app to open. On android all works fine, but on IOS it doesnt.
I currently have:
A link that does open the app but doesnt navigate to the correct screnn - it just shows the last screen that app was on.
I have tried following the tutorial on https://docs.flutter.dev/cookbook/navigation/set-up-universal-links to the letter but still doesnt work
I am using:
Flutter 3.22.3
Go Router 14.2.7
Thanks in advance
I'm developing an iOS app that utilizes Universal Links and ASWebAuthenticationSession to deep-link from a website to the app itself. This implementation adheres to the recommendations outlined in RFC 8252, ensuring that the app opening the ASWebAuthenticationSession is the same app that is launched via the Universal Link.
Problem:
While most users can successfully launch the app via Universal Links,a few percent of users experience instances where the app fails to launch, and the user is redirected to the browser.
What I've Tried:
ASWebAuthenticationSession Configuration: I've double-checked the configuration of callbackURLScheme and presentationContextProvider.
Universal Links: Verified the apple-app-site-association file and associated domains entitlement.
Network Conditions: Tested on various network environments (Wi-Fi, cellular) and devices.
Questions:
What are the potential causes for this behavior?
Has anyone else encountered a similar issue and found a solution?
Are there any debugging techniques or ways to generate more detailed logs?
I haven't been able to determine which device or OS version is causing this problem.
Thank you.
I want to implement webauthn using WKWebView for my mac application. I want to host the asaa file in the rpid. Below are my site configuration -
Main domain - example.com
Subdomain which has the sign-in view and where webauthn kicks in - signin.example.com
RPID - example.com
Where shall i host the asaa file at domain(example.com) or subdomain(signin.example.com)?
The server returns a response content-type must be text/html when universal links are configured
application/json can be used?
I have universal links configured for my iOS app which work as expected when the app is installed. When the app is not installed the universal link will go to the browser as expected.
What I want to do is redirect to the app store, allow the user to install the app, then redirect them to the initial universal link. Redirecting them to the app store isn't the hard part I can achieve that from the webpage, however I don't know how to save a reference to that initial link to redirect them once they instal the app.
What I want the flow to be for a user who doesn't have the app is:
visit a universal link (example.com/UUID)
redirect to the app store and install the app
open the app and redirect to example.com/UUID
I've seen some ways people are doing this with the clipboard but I don't love that solution, I also don't want to use a 3rd party service if I can avoid it - how are the 3rd party services making this happen?
Hi, I have a work task that I need to do that I struggle with...
We would like to sent an email to our clients where in that email there will be a link that will redirect to App Store to our app to be downloaded.
After the app is downloaded when the user opens the app he will automatically have a promocode pasted in our registration flow promocode text field.
Has anyone had similar task ? Is it even possible ? I did some research on this but I didn't find anyone in situation that I have now...
I now that deeplinks are widely used to parse data like this, but I'm not sure if this works even when the app is not downloaded yet. Maybe that the solution will be having a two links, but that would not be very user friendly...
Do you have any advice how to do something like this or some alternatives please ?
Thank you soo much for you time and respond.
We encountered an issue with universal links where the link failed to open the iOS application from Safari when triggered by an javascript outside a click event.
However, when we modified the code to open the link directly via a user click, the application launched as expected. Based on our testing, this issue seems to occur only when there is information for the application cached in Safari (i.e. IDP page cached, redirects to our app, javascript based universal link navigation fails).
Here is a code example of what caused the universal link failure:
const openUniversalLink = () => {
buttonClicked = True
}
useEffect(()=> {
if (buttonClicked) {
window.location.href = universal_link
}
}
<Button
onClick={openUniversalLink}
/>
Here is a code example of what caused our universal links to open successfully:
const openUniversalLink = () => {
window.location.href = universal_link
}
<Button
onClick={openUniversalLink}
/>
Are there defined practices of when we are able to open universal links triggered by javascript vs when they must be opened directly through user action?
Hi everyone! We encountered an issue with universal links where the link failed to open the iOS application from Safari when triggered by an event listener. However, when we modified the code to open the link directly via a user click, the application launched as expected. Based on our testing, this issue seems to occur only when there is information for the application cached in Safari.
Our previous flow that resulted in the broken universal link included:
Data is loaded and a screen with a button to open the universal link is available for the user
When the data is loaded it sets a state variable to true for DataLoaded
The user clicks on the button to open the universal link
When the user clicks the button to open the link it sets a variable to true for ButtonClicked
When DataLoaded and ButtonClicked are true then the universal link is opened
Our new flow that results in the successful universal link includes:
Data is loaded and the user is hit with a loading screen until it is finished
The user clicks on the button to open the universal link and the universal link is opened directly
Does anyone have insights into why universal links must be triggered by direct user action, and in what scenarios this behavior is enforced?
I’m trying to fix an issue with a pipeline that automatically distributes an app to the App Store (TestFlight). Unfortunately, universal links don’t work because the .entitlements file in the build doesn’t include the specified associated domains, even though they are defined. I’ve double-checked the certificates, provisioning profiles, and Xcode settings — everything seems correct. Therefore, I assume the issue lies in the build commands, which are as follows:
Create Archive
xcodebuild -workspace ios/ClientDomain.xcworkspace -scheme ClientDomain archive -sdk iphoneos -configuration ClientDomain -archivePath ios/ClientDomain.xcarchive CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY="Apple Distribution: Company Name (XXXXXXXXXX)" PROVISIONING_PROFILE=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx CODE_SIGNING_ALLOWED=No
Export Archive
xcodebuild -exportArchive -archivePath ios/ClientDomain.xcarchive -exportPath ios -exportOptionsPlist ios/exportOptions.plist
I also want to provide files I use, in order to make sure I don't have any mistakes:
ClientDomain.entitlements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:www.site.com</string>
<string>webcredentials:www.site.com</string>
</array>
</dict>
</plist>
exportOptions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>export</string>
<key>generateAppStoreInformation</key>
<false/>
<key>manageAppVersionAndBuildNumber</key>
<true/>
<key>method</key>
<string>app-store-connect</string>
<key>provisioningProfiles</key>
<dict>
<key>com.bundle.app</key>
<string>xxxxx-xxxxx-xxxxx-xxxxx-xxxxx</string>
</dict>
<key>signingCertificate</key>
<string>Apple Distribution: Company Name (XXXXXXXXXX)</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>XXXXXXXXXX</string>
<key>testFlightInternalTestingOnly</key>
<false/>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>
I'm curious, how people usually distribute their apps to App Store. What if I do something wrong?
Hi developers,
I have a question if it is possible to open in my application not main window but a specific ViewController, when application is installed but not running.
When the application is running in background and I scan QR code, then specific ViewController is opened over SceneDelegate and method 'userActivity'. But this does not work when the application is only installed, but not running.
The Appstore link is here: https://apps.apple.com/us/app/don%C3%A1tor/id6473955033
Description
When you try to open an iOS app using Universal links from another app while the opening app is being updating, Safari will open an error screen(app will not launch).
Is this a specification of universal links on iOS?
Also is it possible for the Main app to detect that the application trying to open Universal Link is being updating?
Devices
iPad 9thGen/10thGen
I am trying to get universal links to work in our app Firefox iOS
The Problem:
I am not able to get universal links to work for our release app or beta app scheme locally or with a TestFlight build.
I am able to get it working on our development scheme with a locally hosted app site association file. I also was able to get it working using our development scheme but setting the bundle id to the release app bundle id. I also built a demo app with the release app id and the release app development certificate. It succeeded there as well.
Implementation Steps:
Added associated domains entitlement to the production and beta schemes for our main app target (No associated domains entitlements or capabilities added for any extensions)
Confirmed that the bundle ids associated with these schemes have the associated domains capability
Added applinks:blog.mozilla.org to associated domains list
Confirmed in code that user activities are being handled via SceneDelegate.swift
Steps to Debug:
I have gone through and validated every step in the provided Universal Link Debugging. All were successful:
Associated Domains Development -> Diagnostics: Opens Installed App
Validate AASA host and applinks match
curl -v https://blog.mozilla.org/.well-known/apple-app-site-association returns the expected json file
swcutil dl correctly downloads the AASA blob
swcutil verify succeeds
I have inspected the IPA of our beta build and confirmed the App ID and the associated domains is an entitlement.
I have looked at the console logs filtering by swcd. I am not seeing any errors and I see the download for the AASA file kick off:
Beginning data task AASA-4BABF039-3C69-4E36-AA4E-ECCDF3D14878 { domain: bl….mo….org, bytes: 0, route: cdn }
There is only one error that appears in the console but our app is not enterprise-managed so I assume this is normal.
Error getting enterprise-managed associated domains data. If this device is not enterprise-managed, this is normal: Error Domain=SWCErrorDomain Code=1701 "Failed to get associated domain data from ManagedConfiguration framework." UserInfo={NSDebugDescription=Failed to get associated domain data from ManagedConfiguration framework., Line=298, Function=<private>}
I have run Sysdiagnos and identified for our App ID:
Site/Fmwk Approval: approved
I am at a loss as to what is preventing universal links from working even though all validation steps pass.
We updated the apple-app-site-association file two weeks ago and we are only seeing the new content from Apple's CDN serving certain regions such as Texas and Canada. Regions such as Colorado intermittently sees the old content and California has been receiving the old content all the time.
Is this a known issue? If yes, when can we expect this to be fixed and where to check the status? If not, can someone in charge of CDN please look into this? Let me know if there is a better place to report this issue and get the support ASAP though.
Thank you in advance and happy new year!
On iOS 18 only, I've been getting this error from the didFailToContinueUserActivityWithType in AppDelegate, the activity needed for universal links. It didn't happen on previous versions of it.
Has anyone encountered this ?
**Description: **
We have implemented a process to launch a native app from a browser (Safari) via universal links. However, under certain conditions, the app does not launch seamlessly, and an error page is displayed in the browser. In such cases, a button to open the app appears at the top of the error page, and pressing this button successfully opens the app.
The error page is a blank white page with only the following error message displayed: "NoSuchKeyThe specified key does not exist."
We want to confirm the detailed specifications and conditions of the behavior where seamless transition via universal links fails.
If there are means to suppress or control the occurrence of this issue, please let us know.
Configuration:
OS: iOS 18.1
Device: iPad 9th generation, 10th generation
**Reproduction Steps: **
When attempting to launch the app via a universal link, a pop-up appears asking "Do you want to allow this page to open ?"
If 'Cancel' is pressed in this pop-up, the issue occurs the next time the app is launched via a universal link.
However, we have also confirmed that this issue can occur due to operations other than this one, and we have not been able to pinpoint the conditions under which it occurs. Therefore, we would like to confirm the detailed specifications and conditions leading to the occurrence of this issue.
Hi Apple developers, I am very new to XCode and Swift, I am planning to build an app for iOS from a web. I tried to use WKWebView to handle the web , I managed to redirect some of the links to Safari, however some button/links didn't trigger .linkActivated function and encounter the error as "Your browser preventing this app to open “URL”.
If I copy the URL to Safari is able to open, I trying to research on web but can't find any related solution for my case.
Here is the code in my app:
import UIKit
import WebKit
import SafariServices
class ViewController: UIViewController, WKNavigationDelegate {
var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
// Initialize WKWebView
let webConfiguration = WKWebViewConfiguration()
//enable javascript
webConfiguration.preferences.javaScriptEnabled = true
webView = WKWebView(frame: self.view.frame, configuration: webConfiguration)
webView.navigationDelegate = self
self.view.addSubview(webView)
// Load a web page as webview
if let url = URL(string: "https://myurl") {
let request = URLRequest(url: url)
webView.load(request)
}
//console log
webView.evaluateJavaScript("console.log('Button clicked!')") { result, error in
if let error = error {
print("Error executing JavaScript: \(error.localizedDescription)")
} else {
print("JavaScript result: \(String(describing: result))")
}
}
}
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
if let url = navigationAction.request.url, navigationAction.navigationType == .linkActivated {
// Check if URL is external and open it in Safari
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
decisionHandler(.cancel) // Prevent loading the link in the WebView
} else {
decisionHandler(.allow) // Allow loading if URL cannot be opened in Safari
}
} else {
decisionHandler(.allow) // Allow the WebView to load the URL normally
}
}
}
In our iOS app we have added example.com in associated domains from the very beginning With no AASA file hosted at example.com domain
Now we need a subdomain app.example.com to be intercepted in our app, so for the same, we are thinking to host AASA at app.example.com and add app.example.com in associated domains too.
so my question is will hosting AASA at sub domain works? If yes, will it affect older apps where app.example.com is not handled.
In short we only want the links with app.example.com to be open in our app not the example.com links