New inApp Purchase Buy item does NOT work under iOS!?!

fjimenezfjimenez Member, PRO Posts: 15

Hello,

I am stuck since weeks ago with this. In Android my build launches the purchases perfectly but under iOS (tested on an iPhone 5 and a 4S), calling any "inApp Purchase" behaviour (including Buy item) does nothing at all!!! After all trials I have tried even just uploading a template I bought for showing new inApp purchase behaviours and it keeps doing nothing (like with my App).

I have created a new Ad hoc profile and nothing. It seems like calling the Buy Item (in iOS) did nothing at all! I have placed a buttom, a simple "when actor is pressed-> buy item", and I get nothing at all!!! I am desperate. As I said, the same build, compiled for Android works perfect and I can buy them items from the Play Store. Can anyone please help me? Thanks a lot.

Comments

  • fjimenezfjimenez Member, PRO Posts: 15

    Hello,

    No suggestions at all? I dont know what else to try...

  • stevejstevej Member, PRO, Chef Emeritus Posts: 435

    @fjimenez said:
    Hello,

    I am stuck since weeks ago with this. In Android my build launches the purchases perfectly but under iOS (tested on an iPhone 5 and a 4S), calling any "inApp Purchase" behaviour (including Buy item) does nothing at all!!! After all trials I have tried even just uploading a template I bought for showing new inApp purchase behaviours and it keeps doing nothing (like with my App).

    I have created a new Ad hoc profile and nothing. It seems like calling the Buy Item (in iOS) did nothing at all! I have placed a buttom, a simple "when actor is pressed-> buy item", and I get nothing at all!!! I am desperate. As I said, the same build, compiled for Android works perfect and I can buy them items from the Play Store. Can anyone please help me? Thanks a lot.

    Are you calling the Request Purchase Data behavior before making purchases? Apple needs that to be run before you can buy an item (they use the data returned from it to make the purchase request instead of the item id, unlike Android).

  • fjimenezfjimenez Member, PRO Posts: 15

    It is included at loading the actor, but in my trials is not working. Do you think it is a matter of having it previously approved at the appstore?

    Thanks a lot for your support!

    @stevej said:
    Are you calling the Request Purchase Data behavior before making purchases? Apple needs that to be run before you can buy an item (they use the data returned from it to make the purchase request instead of the item id, unlike Android).

  • colandercolander Member Posts: 1,610
    edited November 2014

    I had a similar problem where my game was crashing on iOS only but it would run using the provisioning profile of another game. It turned out to be an iTunes
    issue I had to contact them to get it fixed.

  • fjimenezfjimenez Member, PRO Posts: 15

    Finally it partially works!!! It was an issue with the id of the purchase (not using capital letters in the code as Android does not allow them but I didn't update the inapp ids in itunesconnect).

    The problem now is that it is not fully working in testflight as the PurchaseTable is not getting a "purchased" status for that item id, can it be that it never gets a purchased status in test environment?

  • POMPOM Member Posts: 2,599

    Ids are correct in my game, yet i have the same issue, I'm pressing the button and nothing happening :(
    Roy.

  • fjimenezfjimenez Member, PRO Posts: 15

    Have you activated them in itunesconnect? The onyl things I did today that partially fixed my case were to put in lowercase the ids and then ACTIVATE them for the current build

    @POM said:
    Ids are correct in my game, yet i have the same issue, I'm pressing the button and nothing happening :(
    Roy.

  • POMPOM Member Posts: 2,599

    Made a new build, and now its working, then made a new build and it doesn't respond again, then a new build and working again.. :|

    Roy.

  • fjimenezfjimenez Member, PRO Posts: 15

    All issues fixed. I had the check if status was purchased inside the press actor behaviour, just after calling "buy item". This provoked that I did not get the "purchased" status before being evaluated, so I never got it confirmed. I just took the check if it is purchased out of the behaviour of touching the actor and now works.

  • stevejstevej Member, PRO, Chef Emeritus Posts: 435

    @fjimenez said:
    It is included at loading the actor, but in my trials is not working. Do you think it is a matter of having it previously approved at the appstore?

    Thanks a lot for your support!

    One thing you should do is make sure the callback attribute from the request data call is set to 1 before allowing purchases. That way you know the data has been received from Apple and is valid.

  • ArmellineArmelline Member, PRO Posts: 5,368

    Related to the issues in this thread, it's worth noting that if you are deploying builds using TestFlight, the IAP purchase behaviour will only trigger if you deploy your TestFlight build through iTunes Connect. If you use the old TestFlight system to deploy, the Request Data will function properly but the Purchase behaviour will NOT.

  • JPGamesFactoryJPGamesFactory Member, PRO Posts: 174

    it's confermed this issue of iAp with old version of Testflight? As Armeline report...
    My request data works properly but after confirmed the correct purchase...
    nothing happens!!

  • StriderzetStriderzet Member, PRO Posts: 17

    @fjimenez said:
    Have you activated them in itunesconnect? The onyl things I did today that partially fixed my case were to put in lowercase the ids and then ACTIVATE them for the current build

    Can you explain this a little better? where are the case sizes different, in the table or iTunes connect? i have lower case on both.

    i am also testing straight adhoc, no test flight. but i heard elsewhere that it can work that way.

  • ArmellineArmelline Member, PRO Posts: 5,368

    @Striderzet said:
    i am also testing straight adhoc, no test flight. but i heard elsewhere that it can work that way.

    You need to use TestFlight or else it will not work.

  • StriderzetStriderzet Member, PRO Posts: 17

    @Armelline said:
    You need to use TestFlight or else it will not work.

    i tested the achievements using adhoc, i guess testing the IAP's are a world of difference huh?

    how did you set up your Sandbox user to test?

  • ArmellineArmelline Member, PRO Posts: 5,368

    @Striderzet said:
    how did you set up your Sandbox user to test?

    Achievements and GC will work in ad hoc, just not IAP. You don't need to set up a sandbox, you just need to make sure any accounts you want to test it with are included in the TestFlight user list.

  • StriderzetStriderzet Member, PRO Posts: 17

    @Armelline said:
    Achievements and GC will work in ad hoc, just not IAP. You don't need to set up a sandbox, you just need to make sure any accounts you want to test it with are included in the TestFlight user list.

    i have tried the functions myself (internal tester) and my wife i phone (external tester) and the functions still do nothing.

    same thing with the fake sandbox user i made for myself.

    can it be the game salad version (0.13.7 beta)?

  • ArmellineArmelline Member, PRO Posts: 5,368

    @Striderzet said:
    can it be the game salad version (0.13.7 beta)?

    You tried it with a build published through TestFlight? If so and it still didn't work, either your Purchase IDs are wrong or there's a problem with your logic.

    I haven't tried 0.13.7 in a while, but I pushed a build yesterday with 0.13.13 with complete success.

  • StriderzetStriderzet Member, PRO Posts: 17

    @Armelline said:
    You tried it with a build published through TestFlight? If so and it still didn't work, either your Purchase IDs are wrong or there's a problem with your logic.

    even with this simple logic it didn't work:

    0.13.13 huh? i should update to that one then.

  • stevejstevej Member, PRO, Chef Emeritus Posts: 435

    @Striderzet said:

    Just want to point out a flaw in your behaviors. You're not checking that self.callback is 1 in your buy rule, so there's no guarantee that the request for purchase data has completed, or that there weren't any errors.

  • tanerttanert Member Posts: 35

    where is the callback attributes. I can not find

  • stevejstevej Member, PRO, Chef Emeritus Posts: 435

    @tanert said:
    where is the callback attributes. I can not find

    You create the callback attribute(s) yourself, and then tell the behaviors which one to use. That way, you could have a single global attribute for call backs, or one for each actor/behavior, what ever fits your game the best.

Sign In or Register to comment.