ios - IAP: Receives `paymentQueueRestoreCompletedTransactionsFinished:` callback with unfinished transactions -
some times callback
- (void)paymentqueuerestorecompletedtransactionsfinished:(skpaymentqueue *)queue
even before receive this
- (void)paymentqueue:(skpaymentqueue *)queue updatedtransactions:(nsarray *)transactions
i don't finishtransaction:
. find superweird. i've time been assuming paymentqueuerestorecompletedtransactionsfinished:
wouldn't triggered before had marked every unfinished transaction finished.
is expected behavior?
this found in documentation
- (void)paymentqueuerestorecompletedtransactionsfinished:(skpaymentqueue *)queue description
tells observer payment queue has finished sending restored transactions. method called after restorable transactions have been processed payment queue. application not required in method.
i'm not sure means.
i found header file clear on part.
@interface skpaymentqueue : nsobject ... // array of unfinished skpaymenttransactions. valid while queue has observers. updated asynchronously. @property(nonatomic, readonly) nsarray *transactions; @end @protocol skpaymenttransactionobserver // sent when transactions user's purchase history have been added queue. - (void)paymentqueuerestorecompletedtransactionsfinished:(skpaymentqueue *)queue ... @end
these 2 in conjunction make unambiguous. paymentqueuerestorecompletedtransactionsfinished
triggered once storekit
has added transactions skpaymentqueue
. -[skpaymentqueue transactions]
has list of unfinished transactions.
i think docs have been more clear this.
Comments
Post a Comment