The shape of a Crosslink app
- The host is the authority. Capabilities are enforced host-side. A client can ask for anything; the host decides. Never gate a sensitive action in client code alone.
- There is no Crosslink account, and no Crosslink server in the path. A LAN pairing touches nothing you do not run. Signaling and relay are optional, and you can host them yourself.
- The pairing QR is generated, never assembled.
getPairingCode()is the only supported source of a pairing URI. Endpoints come fromconnectionEndpoints(), which advertises only routes that genuinely exist.
Build order
1
Decide what the phone is allowed to do
Write the capability list before any code. It is the app’s security model,
and retrofitting one is far more work than declaring it up front.
See Capabilities and RPC.
2
Stand up a host
createCrosslinkServer, expose, declareEvent, start. Ten minutes.
See Your First App.3
Give the phone a page to load
Serve your client UI from the host’s own listener with
lan.httpHandler,
so one port serves both the page and the socket.
See Serving the client.4
Pick a network mode
Same-Wi-Fi only, relayed, or reachable from anywhere.
See Connection Modes and
Remote Access.
5
Harden and ship
Real pairing prompts, device management, revocation, persistence.
See Production Checklist.
Which package do I import?
Full map, including the packages you should not need to import directly, in
Package Map.
What Crosslink does not do
Being explicit about this saves you from designing against the wrong tool:- No cloud sync. There is no server holding your data. If two phones must agree while the host is off, Crosslink is not the piece that does it.
- No user accounts or multi-tenancy. Trust is device-to-host, established by a physical pairing act. There is no notion of “log in as someone else”.
- No inbound reach it cannot honestly obtain. Behind carrier-grade NAT, the host says so rather than pretending. See Remote Access.