Guides

Deep links

Send people from a shared link or campaign to a screen in your app, with a web or store fallback. The SDK handles routing. Behavioral consent controls whether it reports the open.

Accepting inbound links

The SDK accepts links on pharen.link by default; add your own custom domains to linkDomains at wiring time. Use onLink to receive the destination when the SDK routes an HTTPS link. Pass a universal-link activity to handle(_:) or pass an HTTPS URL directly to handle(url:).

swift
Pharen.shared?.deepLinks.onLink = { link in
    router.open(link.targetPath, link.params)
}

// From .onContinueUserActivity / your scene delegate:
Pharen.shared?.deepLinks.handle(userActivity)

Routing lookup

The SDK can ask Pharen to resolve an accepted link. That request can include the URL path and query string. The lookup URL excludes the fragment and any embedded username or password. It can be sent without behavioral consent because it serves routing.

Open events

The separate deeplink.opened event reports the matched domain, whether the open was deferred or started a session, and, when available, the link or pattern ID and declared campaign fields. It can also report whether a later lookup answer named a different destination after the app had already routed the link. The event omits the incoming URL’s raw path and query string.

Where links come from

Create and manage Pharen links on the platform. The SDK receives links and routes them in your app.

Deferred opens

If a deterministic first-party handoff, such as a code the person carries, delivers the pre-install link to your app, pass its HTTPS URL to handle(url:deferred:) with deferred: true. Full iOS post-install attribution is on the roadmap.