2

I'm in the final stages of adding inApp purchase for a subscription into an app. All appears well, except keep getting an alert title "You're all set" appearing in my next view controller because it is pushed before the alert occurs. How can I intercept the storekit alert so I might push to the next controller after the alert occurs?

  • See also https://stackoverflow.com/questions/37274451/ios-how-to-delay-of-showing-message-purchase-was-successful-to-wait-until-th - it may be that this question should be marked a duplicate of that one. – matt Mar 03 '19 at 23:53

1 Answers1

0

How can I intercept the storekit alert

You can't. It is out of process. Change your app's architecture so that this is not a problem. Use the SKPaymentTransactionObserver to detect the purchase and proceed accordingly. (What I do is put up my own alert, whose dismissal I can detect.)

matt
  • 515,959
  • 87
  • 875
  • 1,141