Hi, I need to implement the restore function in Inapp-Purchase, the "Restore" button is made for this, which calls the method
-(void)restorePurchasedProductsWithProductId:(NSString*)prodID { _productIdsArray = [[NSMutableArray alloc] init]; productID = [prodID retain]; [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; }
This gives me a popup for entering the apple id password. And after that, nothing happens.
I read somewhere that it causes
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
So i liked this
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions { NSLog(@"paymentQueue"); for (SKPaymentTransaction *transaction in transactions) { switch (transaction.transactionState) { case SKPaymentTransactionStatePurchased: [self completeTransaction:transaction]; break; case SKPaymentTransactionStateFailed: [self failedTransaction:transaction]; break; case SKPaymentTransactionStateRestored: NSLog(@"restored"); [self restoreTransaction:transaction]; break; default: break; } } }
But the problem is that the above method does not call this
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
and
-(void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error
I also included the necessary protocols,
Can any body help me why these delegation methods do not trigger the recovery process. I am trying using a test account.
Surureder rathore
source share