Guides
Deep links
Pharen recognizes inbound universal links and hands your app the parsed route through one hook. Links themselves are minted on the platform, so every URL in circulation is one the resolver knows. Telemetry is deliberately minimal — routing itself never waits on consent.
Accepting inbound links
The SDK accepts links on pharen.link by default; add your own custom domains to linkDomains at wiring time. Set onLink once, and it fires for every recognized link — from a universal link (NSUserActivity) or a custom-scheme open:
Pharen.shared?.deepLinks.onLink = { link in
router.open(link.targetPath, link.params)
}
// From .onContinueUserActivity / your scene delegate:
Pharen.shared?.deepLinks.handle(userActivity)Routing always happens for a recognized link — consent gates the telemetry below, never your navigation. link here is the full parse your app gets: target path, query params, and the source host. That full parse is for your app only; it is not what reaches the event stream.
What ships on the wire
Handling a recognized link emits deeplink.opened, and it is deliberately small: the domain the link arrived on, plus a deferred flag. Never the path, never the query string — an inbound URL is sender-controlled and either one can carry a share route that encodes another person's data, or a magic-link token, so neither ever leaves the device.
Where links come from
Link creation is server-side: the platform mints and registers every pharen.link (or custom-domain) URL, so a link in circulation is always one the resolver can answer. The SDK is deliberately inbound-only — an on-device mint would hand out URLs whose registration it could not guarantee. Mint links from the platform, share them anywhere, and your app receives every open through the hook above.
Deferred opens
A tap before your app is installed can't reach it. When you resolve that link after first launch, call handle(url:deferred:) with deferred: true, and it's flagged the same way on deeplink.opened. Full post-install attribution is on the roadmap, stated plainly as such — today, the deferred flag is the whole signal.