IAP consumable
rvantilborg
Member, PRO Posts: 185
trying to get a consumable IAP working, i used the standard purchasable…. when i type in self.Callback, this is not saved….
when i load up the project self.Callback is deleted….
when testing Ad Hoc,upon the game starts i am prompted itunes login.. if i cancel it says: purchase was not succesfull…. and the purchase button doesn't respond at all… why does apple have to change this…. it used to be so easy…. kudos to the one that can fix this! (sorry for making a new discussion, probably somewhere there are more topics about it but im not sure where/how to place it)
Comments
corrected: tablecell value.game.PurchaseTable,1,5 still makes no difference
figured i needed to create an attribute called 'Callback'…. this was not explained in any tutorial…. now the purchase button is responding, but upon game starts its still prompting the itunes login immediately…. sigh...
when trying to purchase again, it say's this purchase has already been made,….
here is a video of whats happening now….
the game keeps asking to login itunes, also upon closing and re-opening.
when attempting to purchase again, it say's 'purchase already done… (the language is dutch)
do i need to put the 'request purchase data' behavior somewhere in between the rules??
after some adjustments now it looks like this:
Would make it so it only triggers when you start the purchase process.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
how?
to be clear, there are 2 problems:
2.when buying IAP it displays: item has already been bought.. (it is a consumable)
Instead of saving the purchasetable, you should be saving the game.pink diamonds attribute.
You never need to save the purchasetable.
Everything else seems to be correct.
Mental Donkey Games
Website - Facebook - Twitter
didnt help at all, i tried both methods now...
-still unable to buy my consumable a 2nd time…(item already bought)
-on game startup, immediately asking for itunes login.
please also check the youtube clip above that shows whats happening...
Okay, points to consider:
There's probably other things going wrong too. I can't see why it would be trying to make a purchase every time you load the game. It makes sense that it tries to request purchase data, which can cause a login to pop up, but I can't see why it would be trying to make a purchase. It sounds like the consume isn't being triggered properly, perhaps.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
contingent??? whut?
'you don't check if the purchase data was successfully filled' how should i do that???
the horror…..
Every time your scene loads, you'll request purchase data. By "contingent" I mean "no condition needs to be met before it happens". My preference is for purchase data to only be requested when the user tries to make a purchase, but there are circumstances where you need to do it differently.
It's recommended that you don't attempt to use "Buy Item" unless the callback attribute is set to 1. If you haven't successfully filled the purchase table using "Request Purchase Data", the user can't buy anything anyway.
You'll do this buy putting an extra condition in that says "If callback = 1".
I'd recommend you download and carefully read through my IAP tutorial template. It's focused on non-consumable purchases, and has a lot more functionality than you seem to want, but I try to explain the main principles involved in some detail.
http://gshelper.com/shop/free-templates-and-tutorials/armellines-in-app-purchase-tutorial-template/
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
i have completely emptied the IAP from the game… now when starting, it is still asking for my itunes login… could it have something todo with iAds?
The persistent iTunes login issue has happened to me before as well. It seems a purchase gets stuck before being completed. For me, logging out of iTunes in my settings and then restarting my device helped.
i tried… doesn't work,just uploaded to itunes connect, lets see if it works then
Getting the iTunes login on app start means you have a purchase associated with that account that did not complete successfully. Either fix it yourself by trying to consume the purchase (if it was consumable) or make another sandbox user. In sandbox, incomplete purchases usually clear out on a test account within 30 days.
i deleted all IAP in the game, if i upload to itunes connect, will other user experience that itunes login prompt? guess not right?
Only if their purchases don't go through successfully. But they shouldn't if your project's IAP logic is set up correctly.
i deleted it:)
deleted all IAP from game, so on my device it keeps asking for login, but on other devices it can't right?
Ah. Yeah without IAP logic, other users won't see the issue. It's happening for you because you have a purchase associated with that bundle identifier (com.yourapp.whatever) and Sandbox is trying to log you in to fix it.
thanks!
@rvantilborg were you able to make you IAP work?? I'm trying to do the same thing but nothing works ... it's a nightmare