You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 07cf58c
Browse filesBrowse the repository at this point in the historyBrowse files
Exposes StoreKit 2's [`Transaction.currentEntitlements`](https://developer.apple.com/documentation/storekit/transaction/3851204-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.
Fixesflutter#61339 and flutter#118960
## Pre-Review Checklist
Copy file name to clipboardExpand all lines: packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2/InAppPurchasePlugin+StoreKit2.swift
Copy file name to clipboardExpand all lines: packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2/StoreKit2Messages.g.swift
Copy file name to clipboardExpand all lines: packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/InAppPurchaseStoreKit2PluginTests.swift
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,51 @@ final class InAppPurchase2PluginTests: XCTestCase {
Copy file name to clipboardExpand all lines: packages/in_app_purchase/in_app_purchase_storekit/lib/src/store_kit_2_wrappers/sk2_transaction_wrapper.dart
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,17 @@ class SK2Transaction {
105
105
return transactions;
106
106
}
107
107
108
+
/// A wrapper around [Transaction.currentEntitlements]
0 commit comments