iPhone +在应用程序内购买 +确定产品是否被购买

发布于 2024-08-10 07:12:19 字数 156 浏览 3 评论 0原文

我正在我的应用程序中实施应用程序内购买。

我想做的是,我几乎没有锁定的功能,一旦用户单击该功能,它就会要求购买该产品,一旦他们购买,该功能就会被解锁。但在此之前,我必须检查用户是否已经购买了该特定产品。如果它已经购买,我不想显示购买该产品的警报。

如何实现这一目标。

I am implementing In App purchase in my application.

What I want to do is that I have few features that are locked and once user click that feature it will ask to buy that product and once they buy, the feature will be unlocked. But before that I have to check whether that particular product is already purchased by the user or not. If its already purchased I don't want to show the alert for buying that product.

How to achieve this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绝不放开 2024-08-17 07:12:19

理想情况下,您应该在购买时保存有关所购买商品的信息,以便您自己检查。如果重新安装应用程序,可以查询应用程序商店以查看您过去的所有交易。

如果您想从商店获取以前的交易列表,请使用 -[SKPaymentQueue restoreCompletedTransactions]。恢复的交易可以像正常交易一样进行验证。

Ideally you should save the information about what has been purchased when it is purchased, so you can just check it yourself. In the event of an application reinstall it is possible to query the app store to see all your past transactions.

If you want to get a list of previous transactions from the store you use -[SKPaymentQueue restoreCompletedTransactions]. The restored transactions can be verified just like normal transactions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文