expo-sharing
allows you to share files directly with other compatible applications.Android Device | Android Emulator | iOS Device | iOS Simulator | Web |
---|---|---|---|---|
🚨Web browser support: expo-sharing for web is built on top of the Web Share API, which still has very limited browser support. Be sure to check that the API can be used before calling it by usingSharing.isAvailableAsync()
.
💡HTTPS required on web: The Web Share API is only available on web when the page is served over https. Run your app withexpo start --https
to enable it.
⚠️No local file sharing on web: Sharing local files by URI works on iOS and Android, but not on web. You cannot share local files on web by URI — you will need to upload them somewhere and share that URI.
expo install expo-sharing
If you're installing this in a bare React Native app, you should also follow these additional installation instructions.
import * as Sharing from 'expo-sharing';
true
if the sharing API can be used, and false
otherwise.mimeType
for Intent
(Android only)