@sendtoapp/core
v0.1.14
Published
Link resolution and deferred install recovery for SendToApp, with no UI framework attached.
Maintainers
Readme
@sendtoapp/core
Link resolution and deferred install recovery for SendToApp, with no UI framework attached.
Most people want @sendtoapp/react-native
instead, which wraps this and handles the platform wiring. Reach for this package when you are
building for a runtime that is not React Native, or when you want to own the integration.
npm install @sendtoapp/coreimport { createLinkResolver } from '@sendtoapp/core';
const resolver = createLinkResolver({ host: 'acme.sendtoapp.com' });
const route = await resolver.resolve('https://acme.sendtoapp.com/l/<code>');
// '/products/42?color=blue', or null when the link is not for this hostresolve returns null for a URL that is not one of your links, and throws for a link that has
been revoked or has expired, so the two cases can be told apart.
Deferred install recovery is in @sendtoapp/core/deferred, and needs a handoff token that only a
platform-specific module can obtain — on Android, the Play Install Referrer.
Documentation
Full documentation is at sendtoapp.com/docs, and sendtoapp.com is what the platform does in one page.
Quick start · Expo and React Native · Install recovery · Knowing when a link failed · Troubleshooting · HTTP API
The rest of SendToApp
- @sendtoapp/react-native — Expo and React Native, with the config plugin that writes the native declarations
- @sendtoapp/expo — Expo, with Google Play install recovery through the Expo module system
- @sendtoapp/react-native-referrer — Bare React Native, with Google Play install recovery
- @sendtoapp/mcp — An MCP server, so an agent can register apps and mint links
- @sendtoapp/protocol — The wire format the other packages share
MIT licensed. Built by SendToApp.
