deepLink
Install the required plugin:
tynd add deep-linkimport { deepLink } from "@tynd/plugin-deep-link/client";Register myapp:// URL handlers and react to incoming links.
API surface
Section titled “API surface”deepLink.register(scheme): Promise<void>— install the OS-level handler for the current binary. On Linux it writes a.desktopentry and runsxdg-mime default; it rejects whenxdg-mimeis missing (noxdg-utils) or fails.deepLink.unregister(scheme): Promise<void>— remove the handler.deepLink.isRegistered(scheme): Promise<boolean>— query the OS handler database. Returnsfalseonce another app has taken the scheme over, even if this process registered it earlier.deepLink.onUrl(handler): { dispose(): void }— fires whenever the running app receives a URL (forwarded from a second-launch whensingleInstanceis active). Calldispose()on the returned handle to detach the listener. The URL is delivered to app-local webviews only, never to a webview showing remote content.deepLink.getStartupUrl(): Promise<string | null>— the URL the app was launched with, if any (cold-start deep link).deepLink.wasForwardedToPrimary(): Promise<boolean>—truewhen this process was a secondary launch that forwarded its URL to the running primary instance and exited early.
A second launch waits at most 2 seconds to connect to the primary. On timeout (or any forwarding failure) the host logs deep-link forwarding disabled, nothing is forwarded, and that process keeps running as a normal instance with the URL as its startup URL (wasForwardedToPrimary() stays false).
The native side handles the per-platform plumbing: LSRegister on macOS, .desktop files for xdg-open on Linux, and the HKCU\Software\Classes registry hive on Windows.