Does anyone have experience with SwiftyStoreKit?
December 19, 2018 at 9:15amDoes anyone have experience with SwiftyStoreKit?
December 19, 2018 at 9:15amI can't really find any detailed explanation on this, but how can I trigger the following callback from SwiftyStoreKit. Also, it is only necessary to call finishTransaction, if your app is downloading content from a server?
SwiftyStoreKit.completeTransactions(atomically: true) { purchases in
for purchase in purchases {
switch purchase.transaction.transactionState {
case .purchased, .restored:
if purchase.needsFinishTransaction {
// TODO: Set flags here that the user has now purchased the product
SwiftyStoreKit.finishTransaction(purchase.transaction)
}
// Unlock content
case .failed, .purchasing, .deferred:
break // do nothing
}
}
}