Skip to content

[in_app_purchase_storekit] Group purchases into a single event in storekit2 - #12237

Merged
auto-submit[bot] merged 8 commits into
flutter:mainfrom
Hari-07:storekit2-restore-purchases
Aug 12, 2026
Merged

[in_app_purchase_storekit] Group purchases into a single event in storekit2#12237
auto-submit[bot] merged 8 commits into
flutter:mainfrom
Hari-07:storekit2-restore-purchases

Conversation

@Hari-07

@Hari-07Hari-07 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. You must list at least one issue.
Fixesflutter/flutter#187355

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the StoreKit 2 implementation to batch restored transactions into a single update callback instead of sending them individually. It aggregates verified transactions into an array and dispatches them together using a new sendTransactionUpdates helper method. Additionally, a unit test has been added to verify that restoring multiple products emits a single batched update. There are no review comments, and I have no feedback to provide.

@Hari-07
Hari-07 requested a review from LouiseHsuJuly 18, 2026 11:56
@stuartmorgan-gstuartmorgan-g added the triage-ios Should be looked at in iOS triage label Aug 11, 2026
@@ -303,7 +304,9 @@ extension InAppPurchasePlugin: InAppPurchase2API {
message:
"This purchase could not be restored.",
details: unverifiedPurchases)))
return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

as far as i can tell, this means that if theres even one unverified transaction, the entire batch of transactions will not be dispatched. is this the behaviour you expect? I would imagine you would want to at least dispatch the verified transactions that have already been iterated over

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah that makes sense, will update

@LouiseHsuLouiseHsu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!😊

@LouiseHsuLouiseHsu added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 12, 2026
@auto-submit
auto-submitBot merged commit 94485f1 into flutter:mainAug 12, 2026
13 checks passed
pullBot pushed a commit to Klomgor/flutter that referenced this pull request Aug 12, 2026
…r#191008)
flutter/packages@aaaf246...94485f1
2026-08-12 22373191+Hari-07@users.noreply.github.com
[in_app_purchase_storekit] Group purchases into a single event in
storekit2 (flutter/packages#12237)
2026-08-12 fluttergithubbot@gmail.com Sync release-material_ui-0.0.3+1
to main (flutter/packages#12439)
2026-08-11 katelovett@google.com [CI] Update deps script
(flutter/packages#12427)
2026-08-11 fluttergithubbot@gmail.com Sync release-go_router-17.5.0 to
main (flutter/packages#12417)
2026-08-11 piyushanand.1221@gmail.com [webview_flutter_android] Set
support for web authentication (flutter/packages#11681)
2026-08-11 nateshmbhat1@gmail.com [video_player] : Add video track
selection support for Android and iOS (flutter/packages#10688)
2026-08-11 sigurdm@google.com Inline error ignores in analysis_options
(flutter/packages#12430)
2026-08-11 fluttergithubbot@gmail.com Sync release-cupertino_ui-0.0.3+1
to main (flutter/packages#12426)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@Hari-07
Hari-07 deleted the storekit2-restore-purchases branch August 13, 2026 04:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit AppCICDRun CI/CDp: in_app_purchaseplatform-iosplatform-macostriage-iosShould be looked at in iOS triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[in_app_purchase_storekit] Storekit2 RestorePurchase should give a single event.

3 participants

@Hari-07@LouiseHsu@stuartmorgan-g