Instance Method

paymentQueue:shouldContinueTransaction:inStorefront:

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

Declaration

- (BOOL)paymentQueue:(SKPaymentQueue *)paymentQueue shouldContinueTransaction:(SKPaymentTransaction *)transaction inStorefront:(SKStorefront *)newStorefront;

Discussion

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 SKErrorStoreProductNotAvailable. 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:shouldContinueTransaction:inStorefront: 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.