Skip to content

Commit

Permalink
In iOS14 comparing payment itself fails as object of payment is not a…
Browse files Browse the repository at this point in the history
…lways the same. In case of success for purchasing product, transaction is SKMutablePayment which is not equal to SKPayment.
  • Loading branch information
Paweł Kordal committed Aug 31, 2020
1 parent 0ac0b16 commit 4d00dd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SKPayment+Promise.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private class PaymentObserver: NSObject, SKPaymentTransactionObserver {
}

func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
guard let transaction = transactions.first(where: { $0.payment == payment }) else {
guard let transaction = transactions.first(where: { $0.payment.productIdentifier == payment.productIdentifier }) else {
return
}
switch transaction.transactionState {
Expand Down

0 comments on commit 4d00dd0

Please sign in to comment.