How to share image/file to another app(using Share.share)?
See original GitHub issueIs this a bug report?
maybe
Have you read the Contributing Guidelines?
yes
Environment
Environment: OS: macOS High Sierra 10.13.2 Node: 9.3.0 Yarn: 1.3.2 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.52.0 => 0.52.0
Target Platform: iOS (10.3),Android(7.1.1)
Steps to Reproduce
1.create base64 string or local filename 2.use Share.share option 3. ` const content = { message: ICON_PLUS_BASE64, //or: message: ‘file:///data/0/tmp/…’, title: ‘share’, url: ICON_PLUS_BASE64, }; const option = { dialogTitle: ‘title title title’ }; Share.share(content, option);
const ICON_PLUS_BASE64 = ‘data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAYAAAA6oTAqAAAAEXRFWHRTb2Z0d2FyZQBwbmdjcnVzaEB1SfMAAABQSURBVGje7dSxCQBACARB+2/ab8BEeQNhFi6WSYzYLYudDQYGBgYGBgYGBgYGBgYGBgZmcvDqYGBgmhivGQYGBgYGBgYGBgYGBgYGBgbmQw+P/eMrC5UTVAAAAABJRU5ErkJggg==’; `
Expected Behavior
(Write what you thought would happen.) App will share(maybe export is more accurate) the image to another app(eg,iMessage,evernote,wechat,etc)
Actual Behavior
The destination app only receive string message but not image.
Reproducible Demo
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:8
Top GitHub Comments
Hey @lucasbento! Sadly, I have no updates. I might try to take a look at the code and try to solve it myself but I have no experience with iOS native code. If I have any kind of success I’ll create a PR and let you know!
I’m experiencing the same behaviour when sharing using whatsapp. When sharing with email the file is attached but with no extension.