saturngod / IAPHelper

No more maintenance for this repo. Please use the https://github.com/bizz84/SwiftyStoreKit
MIT License
1.55k stars 280 forks source link

When restoreProductsWithCompletion fail to retrieve defaultQueue, callback won't be triggered #42

Open EvenCheng opened 7 years ago

EvenCheng commented 7 years ago

in IAPHelper.maround line 237

`

-(void)restoreProductsWithCompletion:(resoreProductsCompleteResponseBlock)completion {

//clear it
self.buyProductCompleteBlock = nil;

self.restoreCompletedBlock = completion;
if ([SKPaymentQueue defaultQueue]) {
    [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
}
else {
    NSLog(@"Cannot get the default Queue");
}

}

`

In the else clause should trigger callback

chirag225 commented 6 years ago

have solve this problem ?