finishTransaction:没有从队列中删除事务...
我有几个非消耗性应用程序。
付款完成一次(正确:SKPaymentTransactionStatePurchased),然后 inApp 的下载正确完成(并完成),最后我调用,
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
但交易仍保留在队列中......为什么?他们不应该被删除吗?另外,以下内容也没有被调用:
- (void)paymentQueue:(SKPaymentQueue *)queue removedTransactions:(NSArray *)transactions
我还尝试在我的 finishtransaction 方法中实现:(
for (SKPaymentTransaction *aTransaction in [[SKPaymentQueue defaultQueue] transactions])
{
[[SKPaymentQueue defaultQueue] finishTransaction:aTransaction];
}
万一我试图完成的事务对象不是正确的,但这也无法删除事务 - 好吧,大多数有时,有时它确实会删除,但行为不一致,我无法弄清楚为什么它们在实际删除的几次中被删除)
I have several non-consumable inApps.
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
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从您的问题来看,您似乎在购买完成后尝试下载某些内容。在这种情况下,您可能应该在下载开始之前调用 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.