Closed
Description
Since iOS 14 I can't seem to finishTransaction
for failed purchases. This will happen if you buy a product then cancel it, this one will stay on SKPaymentTransactionQueue. However re-running the debugger will clear out the transactions.
Steps to reproduce:
- Buy a product
- Cancel the payment screen.
- Buy the product again, nothing will happen (Payment Dialog will not pop out)
I tried this with in_app_purchase v0.3.4+8 and v.0.3.4+9 same thing.
Previously before iOS 14 this is not happening. Need help please.
Previously just by calling .completePurchase()
for iOS its working properly.
I'm also clearing the SKTransactionQueue with this code
Future<void> clearIOSTransactions() async {
// clear the transaction queue for failed completeTransaction or finishTransaction
final transactions = await SKPaymentQueueWrapper().transactions();
print("SkTransactionCount: ${transactions.length}");
for (final transaction in transactions) {
if (transaction.transactionState !=
SKPaymentTransactionStateWrapper.purchasing) {
await SKPaymentQueueWrapper().finishTransaction(transaction);
}
}
}