开发者

Detect re-purchase of in-app purchase

How can I detect this situation in code:

  • User purchase a full version with in-app purchase.

  • User delete the application from iPhone.

  • User installed the application again

  • User purchases full version,

My problem is that in testing, I can see a message box saying "you already purchased...", but in the application updateTransactions not called.

In this situation I need to change to full version. How can I detect this event? I.e., How can I know in my application that the user 开发者_开发百科already purchased so I will "open" to full version?

Thanks.


Use [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]. It will force your app to receive transactions again.

See docs:

  • Restoring transactions
  • - restoreCompletedTransactions
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜