support for react-native-share
I have share base64 pdf file. I need https://github.com/react-native-community/react-native-share library. please support
Still not working on this date ( for shareSingle ).
It redirects me everytime to the app store page of the app targeted. Seems like it doesn't know that the app has been installed. Many answers to that question on google are to update info.plist and list the application you need.
Marc Habib: If you need to update
Info.plistyou can do that in
Michael Wood: 🥲🙏🏼
marked this post as
This works in EAS Build / Custom Dev Clients without needing any Config Plugin. Just install and build!
Added it to the list of known packages that work without a config plugin:
Evan Bacon: I don't understand why it is marked as complete, but still can't use it on Expo Managed project ?
Marc Habib: You
canuse it in a managed project. There's no need to eject to the bare workflow. You just can't use it in Expo Go and you can't build with the classic
Instead of Expo Go, you need to build a development client, and when you're ready to build the production version, you also need to use EAS Build.
Michael Wood: Thanks for the answer.
I have another question, I've built a development client, then installed react-native-share, tried to use it but not working.
Do I have to rebuild the app or it should work without rebuilding ?
Marc Habib: If you add a dependency that
react-native-share) will require a rebuild of the dev client/production app. If you're unsure, rebuild. This might be a nuisance, but there's no way around it.
expo build, but it means your app is bigger than it needs to be because it includes a bunch of native code that you're not actually using (yet?).
Michael Wood: thank you. Everything is clear for me now 😁
Dom Barker: Are you sure? Here's an Expo app using react-native-share that works fine for me:
Michael Wood: Just cloned the repo, everything works except the shareSingle method, which redirect me to the app store page of the app, event if I already have the app.
Marc Habib: I have not tested with Expo SDK 46 on iOS, but I am pretty sure it worked for me before on SDK 45 on the Simulator. Either way it seems like something you would probably have to talk to the react-native-share author about.
Michael Wood: I'm on SDK 45 on a real device, I think on a simulator it's not possible to download social media because there's no appstore
Evan Bacon: Using the package in Expo Go results in an error. Even if it works after an EAS build I don't think this is sustainable. Is there any way we can get full support? I don't think we should mark this complete.
Michael Wood: I know this repo wasn't meant to run on Expo Go but I downloaded it and still see an error when I run it. I understand that right now we need to go through EAS build to use rn-share but this doesn't prevent me from getting errors when developing locally on Go or my simulator. Is there a way to get around it? Will we ever add support in go for this?
Tom Scanlan: Expo Go does not include the native code needed by react-native-share.
You should build a custom development client and use that instead of Expo Go.
A custom development client is basically a version of Expo Go that is built with just
So if you install react-native-share before building the dev client, it will include the native code needed by react-native-share.
Tom Scanlan: To build a dev client for the simulator you can add an EAS Build profile to your
See the following gist for an example:
Then you can build with:
eas build -p ios --profile sim-dev
When it's built, download it, extract the .app from the downloaded .tar.gz file and drag the app onto your simulator to install it.
Then run that instead of Expo Go.
Naveen Prasanth K
Evan Bacon: Hi, Yes it is working properly in Build. No need of any configuration.. Thank you...
Filipe Prata de Lima
This is a very needed library, it's been a make or break for multiple projects.
+1 This would be so much better to have as the expo's Sharing API and React Native's Share api lack some required functionality which is quite basic and supported in react-native-share.
Yes please, this will also solve many other requests as that library contains almost all share features one would desire!
Is this not enough https://docs.expo.io/versions/latest/react-native/share, because it only shares text?
Daniel: No, you can share both files and text with expo-sharing, but you can't share both at the same time. react-native-share lets you share a file with a message as a caption, for example a photo file with a message "look at this". At the moment, expo-sharing does not do this. Therefore, they need to add this functionality to expo-sharing or make Expo compatible with react-native-share.