Apple 在 iPhone 开发中心的介绍 Store Kit 视频中明确指出,我们应该:
"Keep a copy of the TransactionID along with the Customer Information in your server in the cloud. This way if the customer mistakenly deletes your application, you have a mechanism for recovery. You can check your server on first launch of your app for a record of the purchases for a given customer and bring that app back to its state before it was deleted. Believe me your customers will be thankful!"
太棒了!现在,我还没有使用过应用内购买,但正在查看 In App Purchase Programming Guide目前尚不清楚 Store Kit 如何或何时向应用程序提供任何“客户信息”。因此,我的猜测是,无论我们是否使用应用内购买,我们都需要麻烦客户获取这些信息,因为 Apple 不允许我们访问其地址簿中包含此有值(value)信息的 vCard。
我的假设正确吗?为了能够在应用内购买后从应用删除中恢复,我们需要从每个用户那里获取某种类型的唯一信息,以便在每次购买期间登录我们的服务器?
编辑:我们将考虑采用应用内购买的内置产品模型。
最佳答案
对于订阅和消费品,这是正确的。用户名/密码组合或使用 UDID。当然,如果您使用 UDID,则它仅适用于该一台设备。
对于非消耗品,您可以使用restoreCompletedTransactions方法。
关于iphone - 从 iPhone 上的应用内购买交易获取客户信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1597605/