开发者

Detect re-purchase of in-app purchase

开发者 https://www.devze.com 2023-04-02 09:53 出处:网络
How can I detect this situation in code: User purchase a full version with in-app purchase. User delete the application from iPhone.

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

精彩评论

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