You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 29, 2024. It is now read-only.
Enable Associated Domains in Xcode in Signing and Capabilities tab, add domains there. Add the domain and subdomain. Prefix these with applinks:. This will tell the app that we should
download the JSON called "aasa"
Write AASA JSON file according to Apple's requirements.
Backend team adds this page at the desired url.
Test Connection. Make sure app is opening when defined url is hit. Test without app installed for a fallback
iOS link handling implementation. Within the App Delegate OR the Scene Delegate, we need to add code to handle the incoming links. We get back an NSUserActivity.
Within the object lies the incoming URL. This is the specific delegate method with example implementation:
func application(_ application: NSApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([NSUserActivityRestoring]) -> Void) -> Bool
{
// Get URL components from the incoming user activity.
guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
let incomingURL = userActivity.webpageURL,
let components = NSURLComponents(url: incomingURL, resolvingAgainstBaseURL: true) else {
return false
}
// Check for specific URL components that you need.
guard let path = components.path,
let params = components.queryItems else {
return false
}
print("path = \(path)")
}
Universal Links in iOS
Steps
Enable Associated Domains on our App Identifier
Enable Associated Domains in Xcode in Signing and Capabilities tab, add domains there. Add the domain and subdomain. Prefix these with
applinks:
. This will tell the app that we shoulddownload the JSON called "aasa"
Write AASA JSON file according to Apple's requirements.
Backend team adds this page at the desired url.
Test Connection. Make sure app is opening when defined url is hit. Test without app installed for a fallback
iOS link handling implementation. Within the App Delegate OR the Scene Delegate, we need to add code to handle the incoming links. We get back an
NSUserActivity
.Within the object lies the incoming URL. This is the specific delegate method with example implementation:
The scene delegate's version is:
Requirements
Validator located here: https://branch.io/resources/aasa-validator/
The AASA file should be hosted at the root of the url.
Example:
application/json
Once users install the app, the AASA file is downloaded and cached.
Sources:
https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app
https://developer.apple.com/documentation/xcode/supporting-associated-domains
https://www.youtube.com/watch?v=oJaxHabyp-4
https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html
The text was updated successfully, but these errors were encountered: