检测应用内购买的重复购买
如何在代码中检测到这种情况:
用户通过应用内购买购买完整版本。
用户从 iPhone 中删除应用程序。
用户再次安装了应用程序
用户购买了完整版,
我的问题是在测试中,我可以看到一个消息框,上面写着“您已购买...”,但在应用程序中未调用 updateTransactions
。
在这种情况下我需要更改为完整版本。我怎样才能检测到这个事件? 即,我如何在我的应用程序中知道用户已经购买,以便我将“打开”完整版本?
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
[[SKPaymentQueuedefaultQueue]restoreCompletedTransactions]
。它将强制您的应用程序再次接收交易。请参阅文档:
Use
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]
. It will force your app to receive transactions again.See docs: