问题描述
我的应用程序使用订阅模式,我收到一些用户无法通过SKPaymentQueue.restoreCompletedTransactions
恢复订阅的投诉.他们必须删除该应用程序,然后从AppStore重新下载.
My app uses a subscription model and I´m getting complaints where some users can´t restore their subscription through SKPaymentQueue.restoreCompletedTransactions
. They have to delete the app and re download it from the AppStore.
我不太确定为什么只对某些用户发生这种情况,其中一个告诉我他通过iTunes取消并重新激活,另一个关于付款问题.
I'm not really sure why it is happening only to some of the users, one of them told me he cancel and reactivated through itunes, another about a payment issue.
那么为什么他们需要重新下载该应用程序?我猜测收据上的某些信息无法正确刷新,所以我在考虑使用SKReceiptRefreshRequest
代替restoreCompletedTransactions
,或者同时使用两者.
So why do they need to re-download the app? I'm guessing some information is not refreshing properly on the receipt, so I was thinking of using SKReceiptRefreshRequest
instead of restoreCompletedTransactions
, or maybe use both.
有人可以解释这两个过程之间的区别吗?
Can someone explain the differences between the 2 processes?
推荐答案
SKReceiptRefreshRequest
与RestoreCompletedTransactions
之间的区别非常简单:
It is very simple difference between SKReceiptRefreshRequest
vs RestoreCompletedTransactions
:
SKReceiptRefreshRequest
RestoreCompletedTransactions
我们可以同时使用SKReceiptRefreshRequest
&恢复已完成的交易以验证用户订阅,但是在以下情况下,我们必须使用恢复已完成的交易"来刷新收据:
We can use both SKReceiptRefreshRequest
& Restore completed transactions for validating user subscription, But here in below cases we must used to Restore completed transaction instead refreshing receipt:
-
如果您使用Apple托管的内容,则还原已完成的交易会为您的应用程序提供用于下载内容的交易对象.
If you use Apple-hosted content, restoring completed transactions gives your app the transaction objects it uses to download the content.
如果您需要支持iOS 7之前的iOS版本(无法使用应用收据),请恢复已完成的交易.
If you need to support versions of iOS earlier than iOS 7, where the app receipt isn’t available, restore completed transactions instead.
如果您的应用使用非续订订阅,则您的应用将负责恢复过程.
If your app uses non-renewing subscriptions, your app is responsible for the restoration process.
这篇关于SKReceiptRefreshRequest与restoreCompletedTransactions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!