ios - Keep Getting the UIAlert which ask for iTunes password -


i have ios app has in-app purchase , restore purchases functionality.

when testing app in sandbox mode use alert times asking password of itunes account (username populated).

now app live , installed , did in-app purchase , restored purchases, not in sandbox mode still keep getting alerts asking password of itunes account.

following code gives productids have purchased earlier,then pass productids delegate changes status of 'buy' 'purchased'

- (void)paymentqueuerestorecompletedtransactionsfinished:(skpaymentqueue *)queue {     //nslog(@"restored transactions once again in queue purchasing %@",[queue transactions]);      nsmutablearray *purchaseditemids = [[nsmutablearray alloc] init];     //nslog(@"received restored transactions: %i", queue.transactions.count);      (skpaymenttransaction *transaction in queue.transactions)     {         nsstring *productid = transaction.payment.productidentifier;         [purchaseditemids addobject:productid];        // nslog (@"product id %@" , productid);     }      if ( mdelegate != nil && [mdelegate respondstoselector:@selector(purchasedproductlist:)] ){         [mdelegate purchasedproductlist:purchaseditemids];     }      [purchaseditemids release]; } 

any idea how avoid this?

thanks

you need ensure finishtransaction: called. must called , calling on transaction multiple times fine. if isn't called, transaction remains in queue , app try process again later. doesn't matter how transaction added queue, once has been acted upon should 'finished'.

note when restoring new transactions created, wrappers around original transactions, , need 'finished'. restore docs:

the payment queue deliver new transaction each completed transaction can restored. each transaction includes copy of original transaction.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -