Possible issue with IAP?

Monkey Targets Forums/iOS/Possible issue with IAP?

Rieha(Posted 2015) [#1]
I'm currently setting up IAPs on iOS and want to be sure I'm not doing any serious mistakes. I've borrowed code from the iaptest which came with Monkey and standard purchases seem to work fine.

I've also tried to simulate special cases, like this: player taps a button to make a purchase and right after goes to the home screen. Purchase continues even when the game isn't active anymore, with "purchase was successful" notice at the end. Now if I go back to the game, I'll get what I bought, but if I instead quit the game from recently used apps and then restart it, I don't get the purchased IAP.

I'm not sure if the IAP would really be charged in this case, as sandboxed IAPs don't show up in the purchase history and I don't have a published game to test this. I figure this is a very special scenario, but still possible? With nonconsumables I could probably get the IAP with restore purchases, but I currently have only consumables.


Soap(Posted 2015) [#2]
It may not be implemented, but I believe there is a way to check recent purchases. You can save the known purchases in your game, and if a recent one that was purchased doesn't show up you could activate it to the game. Better to do automatic things like this rather than have a popular game where you have many people angry at you and wanting customer support.


Rieha(Posted 2015) [#3]
My workaround is to save the state of the purchase in monkeystore.ios.cpp to a temporary file, as monkeystores default system doesn't work after exiting the game with home button. This way I can check if the purchase was completed when restarting the game. Official fix would be nice, but this appears to work so on to the next challenge.