You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The delegate method for a successful restore is invoked prior to verification completing. As quick and dirty hack I changed the paymentQueueRestoreCompletedTransactionsFinished: method so that it it polls verifyingCount and waits until verifying count reaches zero before telling the delegate that the restore was completed (the modified code is listed below).
If someone has a better idea let me know
(void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
{
DLog(@"restore complete");
self.restoringPurchases = NO;
if( self.purchaseState == ASTStoreControllerPurchaseStateProcessingPayment )
{
// Could be verifying in the background - only update to none state if
// last known state was processing. Since restoringPurchase flag has been
// disabled, the finalize transation will deal with resetting state to none.
self.purchaseState = ASTStoreControllerPurchaseStateNone;
}
static void (^restorePollBlock)() = nil;
if (restorePollBlock == nil) {
__block id b_self = self;
__block void (^b_pollBlock)();
restorePollBlock = [^];
b_pollBlock = restorePollBlock;
}
restorePollBlock();
}
The text was updated successfully, but these errors were encountered:
The delegate method for a successful restore is invoked prior to verification completing. As quick and dirty hack I changed the paymentQueueRestoreCompletedTransactionsFinished: method so that it it polls verifyingCount and waits until verifying count reaches zero before telling the delegate that the restore was completed (the modified code is listed below).
If someone has a better idea let me know
(void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
{
DLog(@"restore complete");
self.restoringPurchases = NO;
if( self.purchaseState == ASTStoreControllerPurchaseStateProcessingPayment )
{
// Could be verifying in the background - only update to none state if
// last known state was processing. Since restoringPurchase flag has been
// disabled, the finalize transation will deal with resetting state to none.
self.purchaseState = ASTStoreControllerPurchaseStateNone;
}
static void (^restorePollBlock)() = nil;
if (restorePollBlock == nil) {
__block id b_self = self;
__block void (^b_pollBlock)();
restorePollBlock = [^];
b_pollBlock = restorePollBlock;
}
restorePollBlock();
}
The text was updated successfully, but these errors were encountered: