restoreCompletedTransactions broken?

前端 未结 7 1864
北荒
北荒 2020-12-11 00:29

Is restoreCompletedTransactions broken in SDK 4.3 ?

I am trying to restore my auto-renewable subscription. It is not resulting in callback to updatedTransactions. He

7条回答
  •  囚心锁ツ
    2020-12-11 00:54

    You should not need the updatedTransactions callback if you are getting paymentQueueRestoreCompletedTransactionsFinished. The "queue" has a list of your transactions and you can loop thru those.

    - (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
    {
        for (SKPaymentTransaction *transaction in queue.transactions) 
            if ([myItem.productID isEqualToString:transaction.payment.productIdentifier])
                myItem.purchased = YES;
    }
    

提交回复
热议问题