Skip to content

[in_app_purchase_storekit] Add SK2Transaction.currentEntitlements() - #13373

Merged
auto-submit[bot] merged 2 commits into
flutter:mainfrom
LouiseHsu:expose-sk2-current-entitlements
Oct 30, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:mainfrom
LouiseHsu:expose-sk2-current-entitlements

Conversation

@LouiseHsu

@LouiseHsu LouiseHsu commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Exposes StoreKit 2's Transaction.currentEntitlements via SK2Transaction.currentEntitlements().
Previously, SK2Transaction.transactions() only wrapped Transaction.all, which returns the user's full transaction history rather than only their currently active entitlements (non-consumable purchases and active auto-renewable/non-renewing subscriptions). Adding SK2Transaction.currentEntitlements() allows callers to query active subscriptions and entitlements directly without invoking restorePurchases() or manually filtering historical transactions.

Fixes flutter/flutter#61339 and flutter/flutter#118960

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 21, 2026

@gemini-code-assist gemini-code-assist Bot 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 adds the SK2Transaction.currentEntitlements() method to the in_app_purchase_storekit package, allowing clients to query active subscriptions and non-consumable entitlements. The implementation wraps StoreKit 2's Transaction.currentEntitlements on the Swift side, exposes it via Pigeon, and adds the corresponding Dart wrapper. Additionally, the changes include fake platform updates and new unit tests to verify the functionality. There are no review comments, and I have no feedback to provide.

@Hari-07

Hari-07 commented Oct 24, 2026

Copy link
Copy Markdown
Member

I think this also fixes flutter/flutter#118960

@LouiseHsu LouiseHsu added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 30, 2026
@auto-submit
auto-submit Bot merged commit 07cf58c into flutter:main Oct 30, 2026
13 checks passed
chunhtai pushed a commit to chunhtai/flutter that referenced this pull request Nov 2, 2026
flutter/packages@3742a4e...3f34a6f

2026-11-01 [email protected] Roll Flutter from
ee8b482 to fcfb4f2 (3 revisions) (flutter/packages#13520)
2026-10-31 [email protected] Roll Flutter from
5e805bf to ee8b482 (17 revisions) (flutter/packages#13512)
2026-10-30 [email protected] [VPAT] Describe the a11y_assessments
dialog for screen readers (flutter/packages#13462)
2026-10-30 [email protected] [go_router_builder] Allow `build` 5
(flutter/packages#13455)
2026-10-30 [email protected] [go_router]
Support nested parentheses, groups, and lookaround assertions in path
parameters (flutter/packages#12571)
2026-10-30 [email protected] [in_app_purchase_storekit] Add
SK2Transaction.currentEntitlements() (flutter/packages#13373)
2026-10-30 [email protected] [all]
Remove broken .claude/skills symlink (flutter/packages#13492)
2026-10-30 [email protected] Roll Flutter from
c091098 to 5e805bf (15 revisions) (flutter/packages#13504)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] 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
gmackall pushed a commit to gmackall/flutter that referenced this pull request Nov 3, 2026
flutter/packages@3742a4e...3f34a6f

2026-11-01 [email protected] Roll Flutter from
ee8b482 to fcfb4f2 (3 revisions) (flutter/packages#13520)
2026-10-31 [email protected] Roll Flutter from
5e805bf to ee8b482 (17 revisions) (flutter/packages#13512)
2026-10-30 [email protected] [VPAT] Describe the a11y_assessments
dialog for screen readers (flutter/packages#13462)
2026-10-30 [email protected] [go_router_builder] Allow `build` 5
(flutter/packages#13455)
2026-10-30 [email protected] [go_router]
Support nested parentheses, groups, and lookaround assertions in path
parameters (flutter/packages#12571)
2026-10-30 [email protected] [in_app_purchase_storekit] Add
SK2Transaction.currentEntitlements() (flutter/packages#13373)
2026-10-30 [email protected] [all]
Remove broken .claude/skills symlink (flutter/packages#13492)
2026-10-30 [email protected] Roll Flutter from
c091098 to 5e805bf (15 revisions) (flutter/packages#13504)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: in_app_purchase platform-ios platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[in_app_purchase] An Active Subscription List iOS

3 participants