问题描述
我正在调试恢复事务,在我的调试配置中一切正常:
I'm debugging restoring transactions and in my debug configuration everything works normally:
IE我打电话:
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
以后的queueCalls:
sometime later the queueCalls:
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
并在之后的某个时间调用:
and sometime after that it calls:
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue {
每个人都很高兴。
但是在我的发布配置中,我从未看到对updatedTransactions的调用,因此我从未真正恢复购买。
BUT in my release configuration, I never see the call to updatedTransactions and so I never actually restore the purchases.
可能相关,在我尝试恢复后它不起作用。我重新启动应用程序,当我向商店询问产品列表时,我发现没有得到回复。
possibly related, after I attempt the restore and it doesn't work. I restart the application and I find that I don't get a response when I ask the store for a product list.
推荐答案
卡尔,正如你所说,这似乎是一个间歇性的错误。
但是,如果我使用美国商店进行测试,我也发现它没有发生(或者至少我还没有看到它)。我一直在使用英国的测试用户,而今天它每次都失败了。创建了一个美国测试用户,并且在自动切换到美国商店后,它再次完美运行。
这不是一个修复,但可能有用;)
Carl, as you said it seems to be an intermittent bug.However, I have also found out that it doesn't happen (or at least I haven't seen it yet) if I test it using the US Store. I've been using a UK test user and today it was failing miserably every single time. Created a US test user, and, after being switched to the US store automatically, it works perfectly again.It is not a fix, but it may be useful ;)
这篇关于SKPayementQueue:恢复事务完成而不在发布配置中调用'updatedTransactions'而不调用调试配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!