SKPaymentTransactionObserver not getting a callback on app switch

后端 未结 2 1640
悲&欢浪女
悲&欢浪女 2021-01-18 08:51

I have in-app purchases set up so that when a user clicks on the buy button, a \"Please Wait\" view appears and adds a payment to the payment queue. This always causes an i

2条回答
  •  终归单人心
    2021-01-18 09:35

    If I understood your situation correctly, you've encountered this problem:

    In App Purchase user cancels tx while app in background: tx state stays on purchasing

    This appears to be a bug in Apple's Store kit. The issue can easily be reproduced if you send your app to background right after initiating a purchase and then pressing the cancel button when the buy confirmation popup is prompted. Your app will never receive the transaction failed(cancelled) notification and will enter a blocked state (if you disabled the UI trying to prevent the user from interacting with the app until the purchase has finished).

    We have to wait for a fix from Apple. In the meantime, if your app is entering a blocked state because you disable UI while making a purchase; you should implement some mechanism to allow the user to leave that state.

    Good luck!

提交回复
热议问题