iOS 13.4 sandbox purchase issues

Hi,


I'm seeing some new behavior, that's possibly a bug, with iOS 13.4 during the sandbox purchase flow.


In older iOS versions, when I made a sandbox purchase, I'd see several popup dialogs from iOS asking me to sign in, and to confirm the test purchase. Since updating my devices to 13.4, when I make a purchase, I see a couple of strange things occurring:


1) The purchase completes without any user interaction - no authentication requests, no purchase confirmation dialogs.

2) Despite using a fresh app install, and a brand new iTunes Sandbox user, it appears that an older receipt is being reused, and it's one which has no details of the current purchase.


Is anyone seeing the same? Can any Apple folks chime in whether this is a known/temporary issue with the sandbox?

I encountered the same issue and although it's not ideal this is my fix:

Code Block
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.
still continue this issue for me,

I'm having exactly the same issue when using TestFlight and the sandbox environment. One minute the pop-up appears almost immediately while the next, it may take 5 minutes or even not pop up on my device until later, when the app isn't even in the foreground. Am I right to think that this is just sandbox behaviour? I've heard mixed things.
Same problem here. Clearly a bug on Apple's side... who knows if it only effects Sandbox or will also happen in production. Of course Apple never replies here, it's a waste of time.
Still facing the same issue, even if i am not logged into any sandbox account, for the first purchase it doesn't give me any validation pop up for purchase and gives me an old receipt. But under sandbox it doesn't show any subscription.

apple must do a better job in terms of development! this is horrible really

iOS 13.4 sandbox purchase issues
 
 
Q