IAP - Restore "Remove Ads" (Save/Load IAP)

As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343
edited July 2015 in Working with GS (Mac)

Hey guys, I'm setting up my In App Purchases and following along @Braydon_SFX video. He mentions about 9:00 mins in that you need to place a restore button in you game, to restore non-consumable items (or else Apple won't approve your app). I have this all set up and working properly.

However, my only non-consumable item is "remove ads". It seems silly to me that a user would want to restore a non-consumable as such... But, I also do not want to get denied by Apple by not placing a restore button.

Am I going about this correctly?

Comments

  • JSprojectJSproject Member Posts: 730

    The whole purpose of "restore purchase" is if a user uninstalls your app or installs it on another device, with the same app store account, then he/she should be able to restore any purchase made within the app in question without paying again. So if a user buys the "remove ads" from you and then e.g. delete your app and install it again then there would be ads displayed until the "restore purchase" had been triggered.

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343
    edited July 2015

    @JSproject Ahh, I see. That makes sense. Thanks. And this restore purchase is only for non-consumables, correct? I do not want to restore consumables, such as purchasing extra coins?

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    Also too, does anyone know how I should save consumable/non-consumable purchases?

    I set them up using a table, so should I use behavior "save table" or save the actual attribute with behavior "save attribute".

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    @As_Of_Latte said:
    Also too, does anyone know how I should save consumable/non-consumable purchases?

    I set them up using a table, so should I use behavior "save table" or save the actual attribute with behavior "save attribute".

    Every since I started using tables to save, that's all I do. You have to change the table cell value then save after. When you start the app load the table cell values into the attributes. Or alternatively you can just use the table to hold that data.

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @RabidParrot Nice, thanks. Tables are a little intimidating for me but that definitely helped and worked properly.

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    Actually, I'm having a little trouble saving and loading my IAP table. Anyone know what I am doing wrong?

    Here is my table:

    Here is how I am saving consumable purchase (coins):

    Lastly, here is how I am loading IAP made inside the first loading scene. I am loading the tableCellValue amount(integer) of coins to game.attribute "TB - IAP".

  • LovejoyLovejoy Member Posts: 2,078

    Fortuna Infortuna Forti Una

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956
    edited July 2015

    +1 For what @Lovejoy said.

    Also, don't load your values from the table with the "Load Attribute" behavior. It's easier to just,

    In the loading scene,

    **{Change attribute

    liveCount

    to

    tablecellvalue(example,1,1)

    }

    Tables are automatically loaded when the game starts so as long as you saved them, the game attributes will be changed to the table's saved values. (**As long as the above behavior is running)

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @Lovejoy and @RabidParrot Thanks guys! I watched the entire video tutorial from @The_Gamesalad_Guru and I believe it is exact. I'll have to test it later with TestFlight to make sure.

    Sooo, as for loading the tables... If I've saved them accurately, do I need to use the change attribute rule in my loading scene? I'm confused, if they automatically load up (if saved properly) what's the rule for?

    Also, if I do have to put the change attribute rule in my loading scene, would it look something like this;

    Change attribute :

    Coins
    to
    tableCellValue(TB-IAP-Storage, 1,1)

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956
    edited July 2015

    @As_Of_Latte said:
    Lovejoy and RabidParrot Thanks guys! I watched the entire video tutorial from The_Gamesalad_Guru and I believe it is exact. I'll have to test it later with TestFlight to make sure.

    Sooo, as for loading the tables... If I've saved them accurately, do I need to use the change attribute rule in my loading scene? I'm confused, if they automatically load up (if saved properly) what's the rule for?

    Also, if I do have to put the change attribute rule in my loading scene, would it look something like this;

    Change attribute :

    Coins
    to
    tableCellValue(TB-IAP-Storage, 1,1)

    The change attribute behavior is for if you are taking the coins you saved in your table and are transferring it to a coin attribute.

    If you are just using the coin in tables and no coin attribute you can disregard loading the valuse because it is done automatically.

    If you did want to load the coins from your table to an attribute it would look like

    Coins

    to

    tableCellValue(TB-IAP-Storage, 1,1)

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @RabidParrot Ok, that makes sense. I am adding the IAP table data to a game coin attribute, so I will add the change attribute rule in my loading scene. Thanks.

  • coreystonecoreystone Member Posts: 8

    On a related note, I read that I should automatically perform a Restore Purchase behavior every time the game loads. Is that true?

    And either way, how do I trigger a behavior (such as Platform Login) only once per game-open? I tried this behavior on my home screen: "if Game Timer < 5, then do Platform Login." But it seems to still trigger when returning to the home screen (ie, after hero dies).

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    @coreystone
    Are you sure you are using game.time and not self.time?

    Mental Donkey Games
    Website - Facebook - Twitter

Sign In or Register to comment.