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
[in_app_purchase_storekit] Fix StoreKit 2 cancel/pending events not sent to purchaseStream
Apply fix from flutter#10736 — StoreKit 2 purchase flow now sends
cancelled, pending, and unverified results to purchaseStream instead of
silently dropping them.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
+54-30Lines changed: 54 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
// Copyright 2013 The Flutter Authors
2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
-
// Autogenerated from Pigeon (v26.1.1), do not edit directly.
4
+
// Autogenerated from Pigeon (v26.1.5), do not edit directly.
5
5
// See also: https://pub.dev/packages/pigeon
6
6
7
7
import Foundation
@@ -172,6 +172,19 @@ enum SK2ProductPurchaseResultMessage: Int {
172
172
case pending =3
173
173
}
174
174
175
+
/// The status of a purchase transaction.
176
+
/// Used to communicate the result state to Dart layer via purchaseStream.
177
+
enumSK2PurchaseStatusMessage:Int{
178
+
/// Purchase completed successfully.
179
+
case purchased =0
180
+
/// Purchase is pending (e.g., Ask to Buy).
181
+
case pending =1
182
+
/// Purchase was cancelled by the user.
183
+
case cancelled =2
184
+
/// Purchase was restored.
185
+
case restored =3
186
+
}
187
+
175
188
/// Generated class from Pigeon that represents data sent in messages.
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/StoreKit2Translators.swift
Copy file name to clipboardExpand all lines: packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/InAppPurchaseStoreKit2PluginTests.swift
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -93,15 +93,15 @@ final class InAppPurchase2PluginTests: XCTestCase {
93
93
94
94
XCTAssert(callback.lastUpdate.count ==1)
95
95
XCTAssert(
96
-
callback.lastUpdate.first?.restoring ==false,
96
+
callback.lastUpdate.first?.status !=.restored,
97
97
"Ordinary purchase updates should not be marked as restoring")
98
98
99
99
plugin.transactions{
100
100
result in
101
101
switch result {
102
102
case.success(let transactions):
103
103
XCTAssert(transactions.count ==1)
104
-
XCTAssert(transactions.first?.restoring ==false)
104
+
XCTAssert(transactions.first?.status !=.restored)
105
105
transactionExpectation.fulfill()
106
106
case.failure(let error):
107
107
XCTFail("Getting transactions should NOT fail. Failed with \(error)")
@@ -388,7 +388,7 @@ final class InAppPurchase2PluginTests: XCTestCase {
0 commit comments