One of the most powerful — and often overlooked — growth levers for any mobile app is the moment a user thinks, "I want to share this with my friends." iOS and Android both provide a built-in Share Sheet that lets users send content to any app on their device: LINE, Twitter, email, clipboard, and more. The walkthrough below adds native Share Sheet functionality to your Rork app, from basic text sharing to image sharing and the event tracking that tells you whether any of it is landing.
Why Share Sheet Matters for App Growth
The Share Sheet is a system-level UI element provided by iOS and Android. Instead of building individual integrations for each social platform, you hand off a message or file to the OS, which routes it wherever the user wants to go.
There are three compelling reasons to implement Share Sheet in your Rork app. First, organic viral growth — every time a user shares your content externally, they create a new touchpoint for potential users. Second, retention through social identity — when users share something, they feel invested in your app and are more likely to return. Third, minimal development overhead — a single implementation covers the entire social ecosystem on both iOS and Android without managing individual SDKs.
Rork apps (built on React Native / Expo) have two main approaches: the built-in Share API from React Native, and expo-sharing for file-based sharing. Let's look at when to use each.
Choosing Between React Native Share API and expo-sharing
React Native Share API (built-in, no installation required) is your go-to for sharing text, URLs, and short messages. It requires zero additional packages and works out of the box in any Rork project. This is the right choice for sharing article links, product pages, referral URLs, or any text-based content.
expo-sharing (from the Expo SDK) extends the Share Sheet to support file-based sharing — images, PDFs, audio files, and more. It requires a quick expo install but is otherwise seamlessly integrated with Expo's managed workflow, making it a natural fit for Rork apps.
A third option, react-native-share, offers advanced features like targeting specific apps (direct-posting to Instagram, Twitter, etc.), but it requires custom native configuration that goes beyond Rork's standard setup. For most use cases, the first two options are sufficient and much easier to maintain.
Sharing Text and URLs
The React Native Share API is available without any additional installation. Here's how to open the Share Sheet with a title and URL:
import { Share, TouchableOpacity, Text, StyleSheet } from 'react-native';
// Share a title + URL — the most common use case
const handleShare = async (title: string, url: string) => {
try {
const result = await Share.share({
title: title,
// Android requires 'message'. iOS treats 'url' as a separate link field.
message: `${title}\n\n${url}`,
url: url, // iOS only: treated as a proper hyperlink (e.g., in Mail, AirDrop)
});
if (result.action === Share.sharedAction) {
// User completed a share
if (result.activityType) {
// iOS only: tells you which app the user chose
console.log('Shared via:', result.activityType);
}
} else if (result.action === Share.dismissedAction) {
// User dismissed without sharing
console.log('Share dismissed');
}
} catch (error) {
console.error('Share failed:', error);
}
};
// A reusable share button component
export const ShareButton = ({
articleTitle,
articleUrl,
}: {
articleTitle: string;
articleUrl: string;
}) => (
<TouchableOpacity
style={styles.button}
onPress={() => handleShare(articleTitle, articleUrl)}
>
<Text style={styles.label}>Share this article</Text>
</TouchableOpacity>
);
const styles = StyleSheet.create({
button: { padding: 12, backgroundColor: '#007AFF', borderRadius: 8 },
label: { color: '#fff', fontWeight: '600', textAlign: 'center' },
});A few things worth noting: always await the Share.share() call and wrap it in try/catch, since the user might have restricted share permissions. On Android, the message field is required — passing only url may result in an empty share dialog.
Sharing Images with expo-sharing
For sharing image files, install expo-sharing and expo-file-system:
npx expo install expo-sharing expo-file-systemThe typical workflow is to download the image to the device's cache directory first, then pass the local file URI to the Share Sheet:
import * as Sharing from 'expo-sharing';
import * as FileSystem from 'expo-file-system';
const shareImage = async (remoteImageUrl: string, filename: string) => {
// Check if sharing is supported on this device
const isAvailable = await Sharing.isAvailableAsync();
if (!isAvailable) {
alert('Sharing is not available on this device');
return;
}
// Download the image to a temporary local file
const localUri = `${FileSystem.cacheDirectory}${filename}`;
const { status, uri } = await FileSystem.downloadAsync(remoteImageUrl, localUri);
if (status !== 200) {
alert('Failed to download image');
return;
}
// Open the Share Sheet with the local file
await Sharing.shareAsync(uri, {
mimeType: 'image/jpeg', // Change to match your file type
dialogTitle: 'Share this image', // Android-only dialog title
});
};Using FileSystem.cacheDirectory ensures temporary files are automatically cleaned up by the OS, so you don't need to manually manage storage. For the user, the experience is seamless — tapping the share button downloads and opens the Share Sheet in one flow.
Troubleshooting Common Issues
A few issues come up regularly when implementing Share Sheet in Rork apps.
"Share.share() does nothing on Android" almost always means the message field is missing. Android's Share Sheet requires the message property to be a non-empty string. Make sure you're passing message: url at minimum, even if you're only sharing a link.
"expo-sharing returns false for isAvailableAsync" is expected behavior on iOS simulators, where file sharing is restricted. Always test file sharing on a real device. Using Rork Companion is the easiest way to install your Rork app on a physical iPhone without needing Xcode or an Apple Developer account.
"Shared URL doesn't open the app when tapped" means your deep link configuration is incomplete. Make sure your app.json has a scheme defined (e.g., "scheme": "myapp"), and that you're generating share URLs in the format myapp://content/123 when you want the link to re-open your app. React Native's Linking module handles the incoming URL on the receiving end.
"Image share fails with file not found" typically happens when Sharing.shareAsync is called before the download finishes. Always await FileSystem.downloadAsync(...) before calling shareAsync.
Tracking Share Events for Growth Analytics
Knowing which content gets shared — and through which channels — is valuable data for improving your app. The Share.share() result gives you exactly that:
import { Share } from 'react-native';
const trackAndShare = async (
contentId: string,
contentTitle: string,
url: string
) => {
const result = await Share.share({
title: contentTitle,
message: `${contentTitle}\n${url}`,
url: url,
});
if (result.action === Share.sharedAction) {
// Log a share event to your analytics service
// Example with Firebase Analytics (pseudocode):
// analytics().logEvent('content_shared', {
// content_id: contentId,
// activity_type: result.activityType ?? 'unknown',
// });
console.log('✅ Shared:', contentId, result.activityType);
}
};Over time, this data helps you identify your most shareable content, optimize the placement of share buttons, and understand which social channels your users prefer. For a deeper look at growth strategies — including push notifications, A/B testing, and retention loops — check out Rork App Growth Strategy: Acquisition, Retention, and Monetization Patterns.
Looking back
Adding Share Sheet functionality to your Rork app is one of the highest-ROI improvements you can make for organic growth. Start with the React Native Share API for text and URL sharing — it requires no extra packages and works on both iOS and Android. Then add expo-sharing when you need file-based sharing (images, PDFs, video). Pair it with analytics event tracking to understand what your users love to share.
If you're ready to go further with user growth — covering referral systems, push notification segmentation, and retention campaigns — the Rork App Growth Strategy Guide is the next recommended read.