Skip to main content
Expo Modules · iOS · Android

Receive shared content.Keep every item.

A typed Expo Module for receiving text, URLs, images, video, audio, and files from the native share sheet—with durable cold-start delivery.

npx expo install react-native-share-content
Photos
Safari
Files
Durable queue3
Aa
Article URLtext / url
ready
IMG_2481.HEICimage · 2.8 MB
ready
Cold start protected
Privacy-safe React Native Share Content demo showing an image payload with preview, filename, size, and App Group file URI
Text URLs Images Video Audio Files

Features & use cases

Built for the moment before your app is ready.

Native share flows start outside React Native. This module bridges that gap without making delivery depend on JavaScript startup timing.

/01No event loss

Cold starts included

A durable pending queue keeps shared content available until JavaScript is ready and your app acknowledges it.

/02SEND_MULTIPLE

Every attachment stays grouped

Text, URLs, images, video, audio, and files from one native share operation arrive as one typed payload.

/03Idempotent plugin

Native setup, generated

The Expo config plugin creates Android intent filters and a native iOS Share Extension during prebuild.

/04Durable file:// URI

Files you can safely keep

Temporary provider data is copied into module-managed storage before the source app revokes access.

/05Events + queue

Fast when warm, reliable when cold

Live listeners provide immediate delivery while pending APIs provide retryable, at-least-once processing.

/06iOS optional

Best-effort iOS return

Keep queue delivery independent of foregrounding. Opt into iosOpenHostAppAfterShare only when you want a best-effort return to the host app.

One durable path

From native share sheet to acknowledged import.

The config plugin creates platform integration. Native code owns the intake. Your JavaScript owns business processing and permanent retention.

01

Receive

Android intents and iOS extension items are normalized into one payload.

02

Persist

Queue records and attachments survive a cold launch until JavaScript reads them.

03

Acknowledge

Clear only after successful import, then release module-managed files explicitly.

See what the API feels like

One handler for warm events and cold-start recovery.

Retryable import flow

Process first. Acknowledge second.

Keep the receipt pending while your import is in progress. If processing fails, the queue remains available on the next launch.

  • Stable IDs for application-level deduplication
  • Attachment cleanup stays separate from acknowledgement
  • The same code works for live and pending payloads
Understand delivery semantics

ShareReceiver.tsx

const subscription = ExpoShareContent.addShareListener(async (payload) => {
  await importShare(payload);

  await ExpoShareContent.clearPendingSharesAsync([payload.id]);
  await ExpoShareContent.releaseSharedFilesAsync([payload.id]);
});

Live and pending deliveryOne processing path, stable payload IDs

Native where it matters

One JavaScript contract. Platform-correct integration.

A

Android

Intents, lifecycle, durable copies.

Receives ACTION_SEND and ACTION_SEND_MULTIPLE, including warm intents and cold-launch delivery.

Android guide

iOS

A real native Share Extension.

Generates the target, App Group queue, entitlements, activation rules, and extension source during prebuild.

iOS guide

FAQ

Before you prebuild.

Native share integration has platform constraints. These are the important ones.

Does this work in Expo Go?+

No. The package contains native Android code and an iOS Share Extension. Use an Expo development build or a production build after running prebuild.

Will an iOS share always open my app?+

No. Queue delivery is reliable, but foregrounding the containing app is not guaranteed by iOS. Auto-open is opt-in and uses a best-effort open chain (UIApplication / responder-chain / NSExtensionContext.open).

Can the same payload appear twice?+

Yes. Delivery is at least once. Pending queries and live events can expose the same stable payload ID, so application processing should be idempotent.

When can I delete received files?+

Acknowledge the queue record after your import succeeds, then call releaseSharedFilesAsync for that receipt. Copy files into application-owned permanent storage first if you need to keep them.

Can I customize accepted content types?+

Yes. Configure Android MIME filters, iOS activation rules, item limits, file-size limits, bundle identifiers, and App Group identifiers through the Expo config plugin.

Start receiving

Make shared content a first-class app entry point.

Install the module, add the config plugin, then create a development build.

npx expo install react-native-share-content
Read the setup guide