Post

Replies

Boosts

Views

Activity

Reply to iOS 13.4 sandbox purchase issues
I encountered the same issue and although it's not ideal this is my fix: func purchaseProduct(_ product:SKProduct) {        let sandbox = Bundle.main.appStoreReceiptURL?.lastPathComponent == "sandboxReceipt" /* check if we're in sandbox mode */       if sandbox { /* remove all unfinished transactions older than 5 minutes */ for transaction in SKPaymentQueue.default().transactions { if transaction.transactionDate == nil || transaction.transactionDate!.timeIntervalSinceNow < -300 { SKPaymentQueue.default().finishTransaction(transaction) } } } /* Wait for 0.3 before starting the purchase */ DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { let payment = SKPayment(product: product) SKPaymentQueue.default().add(payment) } } So only for sandbox I finish all the unfinished transactions older than 5 minutes before making a new purchase.
Jun ’20