The video uses a specific AI coding tool to demonstrate the setup, but the configuration works 1:1 with Cursor, Claude Code, or any other tool. Despia is web framework and tooling agnostic, so the only thing that matters is the SDK call with a properly encoded message and URL.
shareapp:// opens the native share sheet pre-populated with a text message and a URL. The user picks a destination (Messages, WhatsApp, Mail, AirDrop, Twitter, LinkedIn, Notes, anything that registered a share extension) and the OS routes the content into that app. Use this for sharing referral links, social posts, snippets of text with a deep link, or anything where you want a single payload of message plus URL going out together.
For sharing files (PDFs, images, video, archives), use File Sharing instead. Share Dialog is text-and-URL only.
Installation
- Bundle
- CDN
How it works
Two query parameters: the message text and the URL. The runtime opens the share sheet with both pre-filled. The destination app decides how to render them, some apps combine the message and URL into one block of text, others put them in separate fields.encodeURIComponent. Without it, any &, =, or # in your message will break the parser and the share sheet will open with truncated or empty content.
Scheme parameters
| Parameter | Value | Notes |
|---|---|---|
message | The text to include in the shared payload | Wrap with encodeURIComponent. Keep it short, some platforms truncate at 280 characters or less |
url | The URL to attach to the share | Wrap with encodeURIComponent. Most platforms generate a preview from the URL’s Open Graph tags, so make sure your link target has good og:title, og:description, and og:image values |
Share from a button
The natural pattern is a “Share” button next to content that has a public URL. Tap, share sheet opens, user picks where to send it.Browser fallback
In a regular browser the SDK call is a no-op behind theisDespia guard. If you also want to handle web users, fall back to the Web Share API (supported in Safari and most mobile browsers) and to a clipboard copy as a last resort.
Resources
NPM Package
despia-native