react-native-share: Instagram on iOS: the Instagram share option doesn't appear in the standard iOS menu when the message option is passed to open()
I tried installing both the current release and what’s on the master branch. Both are producing this issue:
await RNShare.open({
url: `data:image/jpeg;base64,${base64data}`,
type: "image/jpeg",
message: 'test share message',
});
When you pass a message option, the icon to share to Instagram disappears from the standard iOS share menu. If you remove the message option, the Instagram option comes back and you can share the image successfully.
Instagram works fine in both scenarios on Android.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 25 (8 by maintainers)
Workaround: React Native has a built in { Share } feature which works as expected on iOS, messages degrade gracefully on Facebook and Instagram. Only issue with the built in share is that you cannot supply a url for Android, so I just use Platform.OS to use React Native’s Share for iOS and react-native-share for Android.
Posting here so I don’t forget since it’s the next step I can think of for this issue: Compare
react-native@0.56iOS share module/ActionSheetManager withreact-native-shareandreact-native@0.55to see what changed…react-nativeversionsreact-native-shareiOS implementation ofopen()Right, similar to Facebook share dialogs, I expect Instagram may not allow “default messages” being passed via an SDK. However, the Facebook share option degrades gracefully by ignoring the
messageoption but still attaching an image (in my testing). It would be great if the Instagram option did the same instead of the icon disappearing entirely. 😞