2

I am trying to use StoreKitTest to simulate .failed transaction in my unit tests. For the test session I set:

testSession.failTransactionsEnabled = true
testSession.failureError = SKError.Code.unknown

after that I call:

testSession.buyProduct(productIdentifier: productIdentifier)

I assumed that func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) delegate method should be called with transactionState failed.Unfortunately the delegate method is not called, any ideas why?

I was able to simulate purchased transaction using StoreKitTest. I am using Xcode 12.0 beta 6.

Rob N
  • 15,024
  • 17
  • 92
  • 165
sash
  • 8,423
  • 5
  • 63
  • 74

0 Answers0