Skip to content

Commit 2e63163

Browse files
authored
Update SKPayment+Promise.swift
According to [In-App Purchase Best Practices / Provide the paid content](https://developer.apple.com/library/content/technotes/tn2387/_index.html), > Deliver the content or unlock your app's functionality when your app receives a transaction whose state is purchased or restored. These states indicate that a payment was received for the product being sold. As such, your customer expects to be provided with the paid content. Therefore .restored should be fulfill as .purchased.
1 parent a4873a0 commit 2e63163

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SKPayment+Promise.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private class PaymentObserver: NSObject, SKPaymentTransactionObserver {
2727
return
2828
}
2929
switch transaction.transactionState {
30-
case .purchased:
30+
case .purchased, .restored:
3131
queue.finishTransaction(transaction)
3232
seal.fulfill(transaction)
3333
queue.remove(self)

0 commit comments

Comments
 (0)