Hi, can you help me with the meaning of the -12865 error code? I get it after I download a stream and try to play it from the bookmarks.
Thank you
Post
Replies
Boosts
Views
Activity
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.