我在应用购买中实施。一切都很好,但我的流程总是停在 SKPaymentTransactionStatePurchasing: 有人知道原因吗?请帮忙。
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
NSLog(@"transactions........%@",transactions);
NSLog(@"transactions count........%d",[transactions count]);
NSLog(@"transactions description ........%@",transactions.description);
[[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
for (SKPaymentTransaction *transaction in transactions)
{
switch (transaction.transactionState)
{
case SKPaymentTransactionStatePurchased:
[self completeTransaction:transaction];
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
break;
case SKPaymentTransactionStateFailed:
[self failedTransaction:transaction];
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
break;
case SKPaymentTransactionStateRestored:
[self restoreTransaction:transaction];
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
break;
case SKPaymentTransactionStatePurchasing:
NSLog(@"purchasing");
// [self completeTransaction:transaction];
break;
default:
NSLog(@"default case");
break;
}
}
}