- objective-c - iOS 5 : Can you override UIAppearance customisations in specific classes?
- iphone - 如何将 CGFontRef 转换为 UIFont?
- ios - 以编程方式关闭标记的信息窗口 google maps iOS
- ios - Xcode 5 - 尝试验证存档时出现 "No application records were found"
我的应用使用订阅模式,我收到一些用户无法通过 SKPaymentQueue.restoreCompletedTransactions
恢复订阅的投诉。他们必须删除应用程序并从 AppStore 重新下载。
我不太确定为什么它只发生在某些用户身上,其中一个用户告诉我他通过 iTunes 取消并重新激活,另一个是关于付款问题。
那么为什么他们需要重新下载应用程序呢?我猜收据上的一些信息没有正确刷新,所以我在考虑使用 SKReceiptRefreshRequest
而不是 restoreCompletedTransactions
,或者两者都用。
有人可以解释这两个过程之间的区别吗?
最佳答案
SKReceiptRefreshRequest
与 RestoreCompletedTransactions
之间的区别非常简单:
SKReceiptRefreshRequest
Refreshing the receipt asks the App Store for the latest copy of the receipt. Refreshing a receipt does not create any new transactions. Although you should avoid refreshing multiple times in a row, this action would have same result as refreshing it just once.
RestoreCompletedTransactions
Restoring completed transactions creates a new transaction for every completed transaction the user made, essentially replaying history for your transaction queue observer. While transactions are being restored, your app maintains its own state to keep track of why it’s restoring completed transactions and how it needs to handle them. Restoring multiple times creates multiple restored transactions for each completed transaction.
我们可以同时使用SKReceiptRefreshRequest
& Restore completed transactions来验证用户订阅,但是在下面的情况下我们必须使用Restore completed transaction而不是刷新收据:
如果您使用 Apple 托管的内容,恢复已完成的交易会为您的应用提供用于下载内容的交易对象。
如果您需要支持 iOS 7 之前的 iOS 版本,应用收据不可用,请恢复已完成的交易。
如果您的应用使用非续订订阅,您的应用将负责恢复过程。
关于ios - SKReceiptRefreshRequest 与 restoreCompletedTransactions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40897238/
我正在使用SKReceiptRefreshRequest来验证来自服务器的收据。问题是每次提示密码时它都会询问我。任何人都可以帮我建议一种更好的方法来验证用户收据 这就是我正在做的事情(应用程序启动时
我的应用启动并检查收据。因为是沙盒,app第一次从Xcode运行,需要向App Store索取回执。所以我使用 SKReceiptRefreshRequest 来请求它。 弹出一个窗口,要求提供 Ap
当我们需要刷新 iOS7 收据时,适当的方法是使用 SKReceiptRefreshRequest。这将打开一个 Apple 对话框,供用户使用其 Apple ID 登录。它还允许他们取消。 如何检测
我们目前正在开发一个 iOS 应用程序,该应用程序使用通过 IAP 购买的自动续订订阅。我们希望能够从用户那里获得收据或以前交易的列表,而无需他们输入 iTunes 密码。 文档说明如下: Users
我正在开发一个使用应用内购买的 iOS 应用,我不确定我对 SKReceiptRefreshRequest 是否有很好的理解。它只能在测试环境中使用,还是可以在商店的最终应用版本中使用? IAP 中的
我的应用使用订阅模式,我收到一些用户无法通过 SKPaymentQueue.restoreCompletedTransactions 恢复订阅的投诉。他们必须删除应用程序并从 AppStore 重新下
在WWDC 2013关于处理应用商店收据的演讲中,建议对于iOS应用,应尽快调用收据验证码。甚至在 application:didFinishLaunchingWithOptions: 之前 - 即在
从 stackoverflow 的所有其他答案中,我还没有找到这个特定问题的答案。 我正在使用 SKReceiptRefreshRequest 恢复购买。我正在使用沙盒帐户。我有以下代码: let r
当我使用 .storekit 运行应用程序时Xcode 12.2/iOS 14.2 模拟器中的配置文件,我的 SKReceiptRefreshRequest总是失败,我的 func request(_
我是一名优秀的程序员,十分优秀!