-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Share dialog not resolving promise when dismissed on iOS #26842
Fix Share dialog not resolving promise when dismissed on iOS #26842
Conversation
So it looks like this is because of my PR (#26429). I added this check because we need to have some sort of guard against the success callback being called multiple times. Is there a way we can know that the ActionSheet was closed so we can do |
@v-fernandez so I think we can change the check to: It looks like in Here's when they close the reminders modal: This should fix the current issue without reintroducing the crash. |
@tomtargosz makes sense. I'll update the PR with this. Thanks for the help! |
362d2dc
to
bae030b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pull request was successfully merged by @v-fernandez in 7468a6c. When will my fix make it into a release? | Upcoming Releases |
When is this PR going to be picked? |
https://github.com/facebook/react-native/releases/tag/v0.62.0-rc.0 |
Summary
On iOS the promised returned by
Share.share(content, options)
isn't resolved if the user dismisses the dialog by either pressing "Cancel" or pressing outside the shared dialog. This PR fixes this issue.This fixes #26809.
Changelog
[iOS] [Fixed] - Fix promised returned by
Share.share(content, options)
not resolving if share dialog dismissedTest Plan