问题描述
我有几个非消耗性的inApp.
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:不会从队列中删除事务...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!