IOS如何获得已购买产品的清单? [英] Ios how to get a list of already purchased products?

查看:170
本文介绍了IOS如何获得已购买产品的清单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个使用In app buy的应用。我正在使用非消费类产品。

I'm building an app that uses In app purchase. I'm using non-consumable product types.

一切正常(设置产品,购买......)。

Everything works ok (setting up products, buying...).

我想要验证用户已经购买了哪些产品(重新安装应用程序或更换设备时)?

What I would like to do is to verify which products a user had already purchased (when reinstalling app or changing device)?

这可能吗?

谢谢

推荐答案

参见恢复交易应用程序内购买指南的部分。以下是它具体说明的内容:

See the Restoring Transactions section of the In-App Purchase guide. Here is what it specifically says:


Store Kit提供内置功能来恢复
非消耗品,auto的交易 - 可更新订阅和免费
订阅。要恢复交易,您的应用程序会调用
付款队列 restoreCompletedTransactions 方法。支付队列
向App Store发送请求以恢复转换。在
返回时,App Store会为之前完成的每个
交易生成一个新的恢复交易。

Store Kit provides built-in functionality to restore transactions for non-consumable products, auto-renewable subscriptions and free subscriptions. To restore transactions, your application calls the payment queue’s restoreCompletedTransactions method. The payment queue sends a request to the App Store to restore the transctions. In return, the App Store generates a new restore transaction for each transaction that was previously completed.

这篇关于IOS如何获得已购买产品的清单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆