Sharing and deep links
// Permission ui.share — the OS share sheet
const result = await sdk.share({ title: 'Bài hát', message: 'Nghe bài này nhé!' })
// result.action: 'sharedAction' | 'dismissedAction'
// Permission deeplink — a link that opens YOUR mini app at a path
const link = await sdk.createShareLink({ path: '/song/42' })
// → 'https://i-catholic.org/app/m/<your-app-id>/song/42'
// Permission deeplink — build the link and open the share sheet in one call
await sdk.shareContent({ path: '/song/42', title: 'Bài hát', text: 'Nghe bài này nhé!' })
-
When someone opens a share link, the app launches your mini app and passes the path as
deepLinkPathin thenativeReadyevent. Route to it on start-up. -
Android drops the share
url. React Native's share sheet honoursurlon iOS only. That applies toshare({ url })and to the linkshareContentattaches. If the link must reach Android users, put it in the text:const link = await sdk.createShareLink({ path: '/song/42' })await sdk.share({ message: `Nghe bài này nhé! ${link}` }) -
Note the field names:
sharetakesmessage,shareContenttakestext.