-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(share_plus): unable to get the correct result on iOS #3660
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
Conversation
The Android test failure seems to be a separate issue and is unrelated to this PR. I have already submitted a PR to upgrade the dependencies. |
Just ignore Android part for now, considering that your changes are for iOS. |
Can confirm solves the issue of no response received on iOS 26 beta 6 BeforeiOS 26: Simulator.Screen.Recording.-.iPhone.16.Plus.-.2025-09-09.at.06.10.49.mp4AfteriOS 15.5: Simulator.Screen.Recording.-.iPhone.13.Pro.-.2025-09-09.at.06.05.12.mp4iOS 26: Simulator.Screen.Recording.-.iPhone.16.Plus.-.2025-09-09.at.06.02.10.mp4 |
Thanks @StanleyCocos for the PR with the fix, and @OutdatedGuy for testing it. To me, the code change seems a good simplification on the original implementation, removing this unnecessary (??) What I am not understanding is what was the |
I completely understand your concerns. At first, I was also worried that this change might affect other functionality and potentially cause new issues. However, I believe that according to Apple’s documentation, this property is clearly explained: In practice, there may be a very small number of special cases where this callback is invoked multiple times. However, I believe these special cases can be ignored for now. Alternatively, we could add a callback parameter to pass this callback to Dart to handle these special cases, but that would be another breaking change and still would not fix the issue of correct return values. |
@miquelbeltran If you are Ok with these changes, let's put it into this breaking change release as well. Or you would like to have this change released later? |
hey, yes I am fine with this, and considering how quickly ios26 adoption will be, I'd rather have this fix out. |
Description
This PR removes the previous standard of using the dealloc callback. Since in some cases dealloc may be delayed after sharing is completed, it has been modified to use the official API callback (activityViewController.completionWithItemsHandler), which is also the Apple recommended approach, to ensure normal return in most cases.
fix: #3631
Checklist
CHANGELOG.md
nor the plugin version inpubspec.yaml
files.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?
!
in the title as explained in Conventional Commits).