In-App Purchase Table-- After a purchase is completed the table goes back to "unpurchased?"
iKandy
Imagineer of Crazy ShitNew York CityMember Posts: 310
Why does this happen?
You click on the IAP purchase button-- table value column 5 says "purchased" -- then it goes back to "unpurchased."
What am I doing wrong?
Comments
Is it a consumable iAP?
non-consumable
It's supposed to go back to unpurchased. See my video on the IAP a system.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@iKandy
Say you have an in-app purchase called "removeAds." You will want to make a boolean attribute called removeAds.
After the value of the column of the purchase table changes to "purchased," you will want to change the removeAds attribute to true.
tablecellvalue(game.purchasetable,1,5) is purchased
Change attribute removeAds to true
---Save the removeAds attribute via a table or save attribute behavior.
---For the attribute to work in your game you will have to make a rule that says,
If
removeAds is true
" "
otherwise,
Show Banner
Yes, RabidParrot... I did all that and it worked well the first time. However, when I make another adhoc build of the game and test it, the message from Apple says "you already bought this item...you can get it again for free blah blah blah" and when I press OK.. the game doesn't save the attribute boolean behavior and the table state says "unpurchased."
@iKandy
How are you saving the boolean attribute? If you are making another adhoc build you will need a restore purchases behavior button.
I'm saving the attribute "game unlock" (boolean "true") and loading it back in at reset.
the callback to Apple continually changes from 0 to 1 and the table cel value continually changes from "purchased" "pending" "unpurchased." over and over.