ADR 0008 — Deep Links: .well-known, Platform Routing, Deferred Handoff
Status: Accepted (★ new; fills the Firebase Dynamic Links vacuum — see the landscape)
Context
Section titled “Context”Firebase Dynamic Links shut down on 2025-08-25. Replacements are hosted (Branch, AppsFlyer, Dub). Deep links need three pieces: OS-level association files on the short domain, per-platform routing for users without the app, and deferred deep linking (open the right screen after install).
Decision
Section titled “Decision”- Association files per domain from
Domain.apps: the redirect handler serves/.well-known/apple-app-site-association(applinks.details[].appIDs+components, fromapps.ios) and/.well-known/assetlinks.json(delegate_permission/common.handle_all_urls, fromapps.android),content-type: application/json, no redirect. Pure builders are exported (buildAppleAppSiteAssociation,buildAssetLinks) for hosts serving them elsewhere. - Platform routing: if the app is installed, the OS opens it via the universal/app link before
the server sees the request. Requests that do reach the server from iOS / Android go to
link.ios/link.android(typically the store listing) when set, before rules; the Play Store URL gets&referrer=xl_id%3D{clickId}appended so the installed app can read the click id from the Install Referrer API. - Deferred handoff (
link.deepLink.deferred): on a mobile click the core stores a short-lived handoff (ttldefault 2 h) keyed by click id and by a coarse fingerprint (daily-hashed IP + OS family). On first open the app callsPOST /_links/deferred/claimon the short domain with{ clickId }(exact: Android install referrer / iOS pasteboard) (plus an optionalplatform) or nothing (probabilistic: fingerprint match, newest within the window,matchType: "probabilistic"in the response). A handoff is claimable once. - No SDKs: the claim endpoint is a plain JSON call; the docs show Swift/Kotlin snippets.
Consequences
Section titled “Consequences”- Hosts get universal links on their own short domain with no third party.
- Probabilistic matching is opt-in per link and clearly labelled; IPs are never stored raw.