Reputation: 2507
I'm developing an app using React Native and I have the following piece of code:
Share.share({
title,
message: url,
url,
})
.then((a) => console.warn('', a)
.catch((e) => console.warn('error', e)));
This works fine in Android but in iOS the share dialog open up and closes instantly, while my app keeps freezed, as if it were waiting for some response from the share dialog.
Any idea? Couldn't find any issue related.
This is what I'm using: https://facebook.github.io/react-native/docs/share.html
I've also tried ActionSheetIOS and I get the same behaviour.
Upvotes: 4
Views: 2341
Reputation: 2507
Apparently the share dialog can't be open over a modal in iOS, or something like that. I've solved this emitting an event when the modal is closed, and opening the share dialog after that.
Here is the issue: https://github.com/facebook/react-native/issues/10471
Upvotes: 5