问题描述
我在我的应用中进行了应用内购买,iOS 8的新用户是延期交易,部分描述于
I have in-app purchases in my app, and new to iOS 8 are "deferred" transactions, partially described in a tech note
我理解它的作用,我不需要阻止用户界面,并更新我的UI反映事务状态是延迟的。但是我应该在方法中放置什么 - (void)transactionDeferred:(SKPaymentTransaction *)交易
暂时忽略交易?
I understand what it does and that I need to not block the UI, and update my UI to reflect that the transaction state is deferred. But what am I supposed to place in the method -(void)transactionDeferred:(SKPaymentTransaction *)transaction
to disregard the transaction for the time being?
我是否只更新了用户界面? UI的内容应该是什么?我是否需要用您的购买延期等替换价格标签?我认为没有办法测试这个,至少我没有看到任何与我的沙箱测试帐户有关的事情。如果有办法完成整个过程并看看它是如何工作的,那对我来说会更有意义。
Do I only have update the UI? Also what should the content of the UI be? Do I need to replace the price label with something like "Your purchase is deferred"? I don't think there is a way to test this, at least I haven't seen anything about it with my sandbox test account. If there was a way to go through the process and see how it works, it would make a lot more sense to me.
推荐答案
我在做的是:
- 停止指标动画
- 激活购买和恢复按钮
- 显示提醒:
- Stopping indicator animation
- Activating buy and restore buttons
- Showing an alert:
我观看了WWDC 14视频。 Apple说你不应该阻止UI并允许再次单击购买按钮。我认为我们需要这个以防父母错过警报,所以孩子可以再发一次。
I watched WWDC 14 video. Apple says you should't block UI and allow to click on buy button again. I think we need this in case parent miss alert, so child can send one more.
我知道我们不应该致电以下延期交易的方法:
What I know is that we should not call following method for deferred transactions:
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
这篇关于应用程序应该如何处理延迟的SKPaymentTransaction?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!