finishTransaction:没有从队列中删除事务...

发布于 2024-11-26 14:20:00 字数 677 浏览 0 评论 0原文

我有几个非消耗性应用程序。

付款完成一次(正确: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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

预谋 2024-12-03 14:20:00

从您的问题来看,您似乎在购买完成后尝试下载某些内容。在这种情况下,您可能应该在下载开始之前调用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文