What to do with all transactions after - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions?

I've already implemented this method to handle the transactions and I think it's always being called correctly. I always finish a transaction when it fails or is completed or restored.

But why do I keep receiving all of the transactions, including the ones that have been already handled? Should I just get always only the latest one and ignore the others?

I've seen some examples of code to handle this, but they all loop through all of the transactions, which doesn't make much sense to me.

Other details:

  • I'm working with auto-renewable subscriptions
  • I noticed this behaviour in the sandbox environment. Does it make any difference?
  • It takes too long for this method to be called after invoking - [SKPaymentQueue restoreSubscription]

-------------Problems Reply------------

Apple's design to send a transaction array isn't without reason. Your description means you are skipping some of them now, or you initiated some before your code was perfectly finishing them up.

Another possibility is that you are getting them from previous user in which case you can't do anything about.

Category:ios Views:3 Time:2019-03-13
Tags: ios storekit

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.133 (s). 11 q(s)