restoreCompletedTransactions坏了吗? [英] restoreCompletedTransactions broken?
问题描述
SDK 4.3中的restoreCompletedTransactions是否已损坏?
Is restoreCompletedTransactions broken in SDK 4.3 ?
我正在尝试恢复自动续订订阅。它不会导致对updatedTransactions的回调。这是我的代码。
I am trying to restore my auto-renewable subscription. It is not resulting in callback to updatedTransactions. Here is my code.
{
....
[appDelegate.inapp loadStore];
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
....
}
期待回调更新的交易,但不要收到它。
Expecting callback to updatedTransactions, but do not receive it.
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
NSLog(@"IN updatedTransactions, transaction.transactionState");
for (SKPaymentTransaction *transaction in transactions)
{
switch (transaction.transactionState)
{
...
...
case SKPaymentTransactionStateRestored:
NSLog(@"IN updatedTransactions, SKPaymentTransactionStateRestored");
[self restoreTransaction:transaction];
break;
}
}
}
但是我最后收到这个电话。
But I do receive call to this at the end.
-(void) paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue {
}
推荐答案
如果你还是(1)这仍然会发生在Sandbox环境中进行测试,测试用户已损坏。在 iTunes Connect 中创建一个新的测试用户,然后重试。
This can still(1) happen if you're testing in the Sandbox environment and your Test User is broken. Create a new Test User in iTunes Connect, and try again.
目前还不完全清楚是什么让测试用户变坏了;根据我收集的内容,在非沙箱环境中使用它们可以做到这一点,但也可能有其他原因。
It's not entirely clear what makes Test Users go bad; from what I gather, using them once in a non-sandbox environment can do this, but there may be other reasons as well.
(1)Xcode 4.3.1, iOS SDK 5.1
(1) Xcode 4.3.1, iOS SDK 5.1
这篇关于restoreCompletedTransactions坏了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!