Skip to content
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_plus): Add missing call to result for shareUri on iOS #2616

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

miquelbeltran
Copy link
Member

@miquelbeltran miquelbeltran commented Feb 27, 2024

Description

  • The code was never completing when being awaited.
  • This is due to the missing call to result(nil).
  • Tested on iOS simulator using example project.

Related Issues

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

Comment on lines +361 to +362
if (!withResult)
result(nil);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

withResult may always be false in shareUri, so I am tempted to just always call to result(nil).

However, since this value comes from the Dart side, we cannot warranty that in native code. That's why I added the if-condition here.

@miquelbeltran miquelbeltran marked this pull request as ready for review February 27, 2024 08:51
@miquelbeltran miquelbeltran changed the title fix(share_plus): #2609 Add missing call to result for shareUri on iOS fix(share_plus): Add missing call to result for shareUri on iOS Feb 27, 2024
@miquelbeltran miquelbeltran merged commit 65f23a5 into main Feb 28, 2024
18 of 19 checks passed
@miquelbeltran miquelbeltran deleted the miquelbeltran/2609-shareUri-result branch February 28, 2024 08:40
suquant pushed a commit to suquant/plus_plugins that referenced this pull request Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Share Plus calling Share.shareUri return a never complete future
2 participants