IAP problem after restart

0 favourites
  • 6 posts
  • I'm using cranberrygame IAP plugin, and everything works fine until I turn off the app and restart it, then it "forgets" the purchased items that has been bought.

    I get a message that it wants me to log in to my apple account when I open the app, but I'm already logged in to it. (I'm using testflight beta testing). And even if I log in, the "Has product" still doesn't work.

    I tried having "restore purchases" in start of layout and that works but I don't want the users to have to log in everytime they start the app, that shouldn't be neccessary and it looks suspicious maybe.

    I have On start of layout - Add product ID's and request store listing

    then I have

    On request store listing succeeded/ has product and I unlock the things that are bought.

  • Haven't you kind of answered your own question there, "restore purchases" is used to restore the purchased items.

  • But from what I've read, that function is only for for example a restore button, which is used when the user has installed the app on another device for example. And that requires the user to write the password again to their app store. And that shouldn't need to be used in the beginning everytime it starts, you should only need to have request store listing in the beginning and then the "has product" should work. At least that's what I've read in all of the tutorials I've read about IAP in construct.

    I wouln't want to log in on app store everytime I started an app, I would be annoyed and not use it I think.

    But maybe I've misunderstood something, or need to add something else along with restore purchases?

  • Oh right you're in test mode, yeah all purchases will be forgotten when you restart.

  • But I also actually sent the app to apple and they approved it, I put it on the app store for a while, and I had a friend try one of the IAPs, and it didn't remember then either :/

    I really hoped that it was just a testing thing but it doesn't seem seem like it unfortunaly..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • cranberrygame could you just confirm if I need to use restore purchases in the beginning and if so, could that be done without the popup message with the log in to come up?

    Here's a screenshot of the code I'm using. I'm using the variables since I'm having request store listing again later and I only want this to be activated once.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)