Skip to content

Commit

Permalink
Merge pull request #14 from pkordal/bugfix/iOS14AndProductIdentifier
Browse files Browse the repository at this point in the history
In iOS14 comparing payment fails for successful purchase.
  • Loading branch information
mxcl authored Aug 31, 2020
2 parents 0ac0b16 + 4d00dd0 commit e26f6a5
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 e26f6a5

Please sign in to comment.