In-App Purchase - Consumable Product - issue in iOS 9

Steps to reproduce the issue in development environment:

- Buy an in-app product of type consumbale

- Dont Finish the transaction in updatedTransactions Method. (We do this to create an Incomplete Transaction)

- Buy the Product again.

- Storekit will Prompt woth a message saying that the Product will be restore for free.

- Once if we click ok.

- Then non of the delegate methdos get called.


Anyone face similar issue? If So, what do we need to do? Is it an issue in Storekit?😕

What happens if you cause the app to execute a removeTransactionObserver and then cause the app to execute an addTransactionObserver. Alternatively, what happens if you close the app and then relaunch it.

If i close and relaunch the app, i get a call to updatedTransactions delegate method.

Execute a removeTransactionObserver and then execute an addTransactionObserver. See if that causes your updatedTransactions method to be called.

Hello!


Here I have a similar problem, but in my case, in every consumable purchase it prompts the message saying that the product will be restored for free and no delegate method is called.
I've tried removing the transactionObserver and adding it again and no call to updatedTransactions method is executed.
It seem like is a mistake of consumable/non-consumable product.



Did someone successfully solve the problem? I would appreciate an answer 🙂

There is no problem if you call finishTransaction. If your flow gets interrupted because your app quits then there is no problem because the next time the app launches (or the user goes to make another purchase) then the app addTransactionObserver call will result in the original transaction reappearing.

I've replicated this problem before. It's an issue with iOS, not with the Store. To my knowledge, the Store responds correctly, however the transactionObserver which searches the store for incompleteTransactions doesn't pass the notification to the app (by calling the updatedTransactions delegate method) I made a small change to my iAP sample to not call finishTransaction on the first time the updatedTransaction delegate call was entered. This resulted in an incompleteTransaction. I then moved the app to the background, then back to the foreground and observed in the console log that the transactionObserver triggered a request for pedning incompleteTransactionas. The Store responded with


Jan 8 10:59:26 richards-iPod-touch itunesstored[124] <Warning>: LoadMicroPaymentQueueCountOperation: Server claims 1 items for p2-in-app-check-download-queue


but the updatedTransactions delegate method wasn't called. I submitted rdar://24109782,but the issue remains under investigation.


If the app is relaunched, and the transactionObserver is activated, it will be notified of the incompleteTransaction - where the finishTransaction can be called. I find the problem only occurs when trying to synthesize the incompleteTransaction, then checking that the incompleteTransaction is detected when the app is backgrounded, then moved to the foreground.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

rrich, can you verify that this problem does not exist if you removeTransactionObserver and then explicitly addTransactionIbserver when the user requests it? I know this is not apple best practice but it might work.

In-App Purchase - Consumable Product - issue in iOS 9
 
 
Q