-paymentQueue:updatedTransactions: called continuously every time app is in foreground

-(void)paymentQueue:(SKPaymentQueue*)queue updatedTransactions:(NSArray<SKPaymentTransaction*>*)transactions

In the sandbox environment this is called continuously every time my enters the foreground. I call -finishTransaction on approximately 22 transactions. Confirmed by:

    NSUInteger finishCount = 0;
    NSUInteger transactionCount = transactions.count;
    for (SKPaymentTransaction *aTransaction in transactions)
    {
       // Check state..if purchased or restored..
       [[SKPaymentQueue defaultQueue]finishTransaction:aTransaction];
      finishCount++;
// Post notification telling everyone here!
    }

NSLog(@"Finsihed %lu of %lu",finishCount,transactionCount);

The log at the bottom says - finished 22 of 22 transactions. But every time the app enters the foreground the -paymentQueue:updatedTransactions: is called again with another batch of transactions. How

Over and over again. Not sure how this is possible but the transactions seem to never clear from the queue. I hope this may be limited to the sandboxed environment. In this loop after finish transaction is called I then post a notification which kicks off receipt validation...and then I even store something in the keychain. Doing this work over and over again in a tight loop is very unexpected and causes my app to lock up.

Yea I know this is deprecated. Will move to my Objective-C storekit 2 wrapper but breaking SK1 on purpose seems kind of um, rude. Hope this is only in the sandbox environment. This app got sidelined even though I got some plans to resurrect it in the back of my head.

-paymentQueue:updatedTransactions: called continuously every time app is in foreground
 
 
Q