Instance Method


Asks the delegate if the transaction should continue if the device's App Store storefront has changed during a transaction.


optional func paymentQueue(_ paymentQueue: SKPaymentQueue, shouldContinue transaction: SKPaymentTransaction, in newStorefront: SKStorefront) -> Bool


StoreKit calls this delegate method if the storefront changes while processing a transaction.

  • Return true if you wish to continue the transaction within the updated storefront.

  • Return false to stop the transaction. The transaction will fail with the error SKError.Code.storeProductNotAvailable. In this case, consider displaying a message to the user indicating that the product is not available in the current storefront.

If the delegate is not implemented, paymentQueue(_:shouldContinue:in:) defaults to true.

This call times out after approximately one second, defaulting to false and causing the transaction to fail. The delegate should return as quickly as possible. Do not perform any networking calls in this method. Your app should cache product availability information locally before starting a transaction.