In-App Purchases, restore / load?
How can I save the boolean of an non-consumable in-app purchase?
Simple in the "Thank-You-Screen" after buying the In-App and load then on game-start?
I thought it will be detected automatically when loged in, that the user own this In-App, but it didn't...
Or is there the danger with this load attribute-behavior, that the game will free for all? No, right? Because it wouldn't be saved till the user gets to this screen and he gets only there after buying the In-App...?!
Simple in the "Thank-You-Screen" after buying the In-App and load then on game-start?
I thought it will be detected automatically when loged in, that the user own this In-App, but it didn't...
Or is there the danger with this load attribute-behavior, that the game will free for all? No, right? Because it wouldn't be saved till the user gets to this screen and he gets only there after buying the In-App...?!
Comments
But you still need to have the 'Restore IAP" feature somewhere. That is an Apple requirement.
Here is how I did it.
When the purchase is made it switches a Boolean game.adsoff to true.
Rule
When attribute game.adsoff is true
Write to table
IAP.TBL
Row 1
Colum 1
True
Timer
After .02 (.02 is one pass of code this time to be sure the write happens before the save)
Save table IAP.TBL
Now in your start scene
Change attribute game.adsoff to TABLECELLVALUE (IAP.TBL.1,1)
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
What must the Restore-Button do? And where must it be placed?
I didn't see it in other games?!
@FryingBaconStudios: I can do this also by loading/saving attribute of the boolean, right?
http://cookbook.gamesalad.com/tutorials/5/parts/26
If I delete the app from the device and install a new version. Then I get to the screen to buy it. And then I got the message, that I already pay for it, if I would get it again for free.
In the cookbook, there is also the info, that it is not currently a requirement - or was that an older one?
regarding the load / save of the boolean:
I save the boolean att after the buy-process and load it at the game start. I didn't do that with saving/loading in the table but with the simple save/load att.
It's the same, right?
In my test it works.
Why are you so resistant on using a table? It is better to use a table for tons of reasons.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
That may be, but I have only this one boolean for InApp.
I work with tables, but not saving anything there.
"...if your application supports product types that must be restorable, you must include an interface that allows users to restore these purchases. This interface allows a user to add the product to other devices or, if the original device was wiped, to restore the transaction on the original device."
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Must the restore-button on the same scene, where the user has the chance to buy the complete game or can/must it be at another position?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Also the question, if the restore-button must have a fixed position in the game, or if it is enough place it next of the buy-button.