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

前端 未结 1 1329
暗喜
暗喜 2021-01-02 16:40

I have some odd behavior with User canceling in App Purchase (Sandbox Environment) while the app is in background and the user is not yet logged in to the store:

The

相关标签:
1条回答
  • 2021-01-02 17:24

    I don't believe you can count on ANYTHING when it comes to Store Kit. Rather than "waiting expectantly" for the transaction to be queued after the "Buy" button is pressed, just go on about your business. When you are notified that there are transactions (which could be tomorrow) process them. I believe there's a comment to this effect in the documentation -- that your app should register for SK notifications when it's launched and it should expect to get them at any time. So don't build any awareness of "state" into your app when it comes to Store Kit. Just process the transactions as they arrive.

    0 讨论(0)
提交回复
热议问题