almost there, just testing tap, need some help

I had created the iap on iTunes connect with id alienescape2025, same id is on my buy item, testing on the web creator does works but when I make a file and installed on my iPad, clicking does nothing, I might be forgetting something about sandbox testing?

Comments

  • ArmellineArmelline Member, PRO Posts: 5,426

    I don't know if testing IAP on sandbox is impossible, but I never got it to work. Much easier and more reliable to test using TestFlight. If I remember right, to test the IAP via sandbox you need the right kind of provisioning profile set up. If you can, just test via TestFlight with a distribution profile and it's a much easier process.

    You likely don't need to be saving the table, though. In fact, it's normally a bad thing to do with the PurchaseTable as the only up-to-date version tht matters is the one Apple have, so you should be pulling it from them when needed.

  • artigiano1987artigiano1987 Member, PRO Posts: 10

    Ah ok thanks for your suggestion, i will look into testflight see how it works.

  • artigiano1987artigiano1987 Member, PRO Posts: 10

    does anyone knows what this does or if is necessary at all? thank you

  • ArmellineArmelline Member, PRO Posts: 5,426

    If you want to support IAPs on iPhone/Android, you need that. It does the initial pull of the purchase data into the table from Apple/Google's server, so you can tell if a player has made a purchase. If I remember right, you can avoid it if you really want to, as you can save a local attribute when they make a purchase, and any attempt to restore purchases will pull the purchase info. But keep in mind that a player can delete your game, then install it again and you'll only know if they made a purchase by pulling the info from Apple/Google as any saved attributes will have been deleted so they'll need to do a purchase or restore before you game can know if they already own something.

    Realistically you should be triggering that any time the player makes a purchase or any time you want to check if they've previously made a purchase.

  • artigiano1987artigiano1987 Member, PRO Posts: 10

    hey armelline thanks for your help, do you know what I should put on the callback attribute? I think on start index should be -1 and 1 on end index but still confused what to put on callback, right now my purchase table I had id as unlockgame ,

  • ArmellineArmelline Member, PRO Posts: 5,426

    Start index: 1

    End index: -1

    (The -1 just means "the end of the table, wherever that might be" and you can just put the last row number too if you'd prefer.)

    For callback, it's just an integer. Make a game.Callback attribute (can be called anything) and when the game contacts Apple/Google for the Purchase Data it will return 1 if when it succeeds and -1 if it fails (e.g. no internet connection).

Sign In or Register to comment.