finishTransaction: 不是从队列中删除事务... [英] finishTransaction: isn't removing the transaction from queue...

查看:28
本文介绍了finishTransaction: 不是从队列中删除事务...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个不可消耗的应用程序.

I have several non-consumable inApps.

付款完成一次(正确:SKPaymentTransactionStatePurchased),然后inApp的下载正确完成(并完成),最后我调用

The payment is done once (correctly: SKPaymentTransactionStatePurchased), then the download of the inApp is correctly done (and finished) and finnaly I call

[[SKPaymentQueue defaultQueue] finishTransaction:transaction];

但是交易仍然在队列中......为什么?他们不应该被删除吗?也没有调用以下内容:

however the transactions remain in the queue... why? aren't they supposed to be removed? also the following isn't being called:

- (void)paymentQueue:(SKPaymentQueue *)queue removedTransactions:(NSArray *)transactions

我也尝试在我的 finishtransaction 方法中实现:

I've also tried to implement in my finishtransaction method:

for (SKPaymentTransaction *aTransaction in [[SKPaymentQueue defaultQueue] transactions])
{
    [[SKPaymentQueue defaultQueue] finishTransaction:aTransaction];
}

(如果我试图完成的交易对象不是正确的,但这也无法删除交易 - 大多数情况下,有时它确实删除但行为不一致,我不能弄清楚为什么它们实际上被删除了几次)

(in case the transaction object i was trying to finish wasn't the correct one, but this also fails to remove the transactions - well most of the times, sometimes it does remove but the behaviour is inconsistent, I can't figure out why they are removed the few times they are actually removed)

推荐答案

从您的问题来看,您似乎是在购买完成后尝试下载某些内容.在这种情况下,您可能应该在下载开始之前调用 finishTransaction.

From your question, it appears that you are trying to download something when purchase completes. In this case, you should probably call finishTransaction before the download starts.

这篇关于finishTransaction: 不是从队列中删除事务...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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