I am building a mobile game for Android / iOS with support for in-app purchases. Our game also supports unlock codes (aka promo codes). A user can enter an unlock code in our app to unlock one or more IAP items for free. We want to ensure, that if a user changes his device, we is able to restore all IAP items and unlocked items.

As the promo code feature provided on app stores is either quite limited in functionality or not available at all, we've decided to build our own backend to manage unlock codes. If a user enters an unlock code, we register this in our backend.

So, when a user re-installs the app, we need to talk to two systems to get the full list of purchased/unlocked items:

  • Talk to app stores to fetch list of purchased items
  • Talk to our own backend to fetch list of unlocked items

To make sure that the user gets his unlocked items even after an app-reinstall on a different device, we need to have an identifier which is not based on the device but rather on a user account. Unity does not provide access to Apple ID / Google ID, so my question is, how to accomplish this in a good way?

At the moment, the only possible solution I see is this:

Users must register with us (e.g. email and password). We store the list of unlocked items in our own backend. In case of an app reinstall on a new device, the user must login to our backend and unlocked items become available again.

Are there any better solutions to this?

  • \$\begingroup\$ PlayFab might work for you. have you looked into that? \$\endgroup\$
    – Swati
    Sep 6, 2019 at 13:09
  • \$\begingroup\$ @Swati: Yes, I did. But I think it is a bit too much for what we need and thus too expensive. \$\endgroup\$ Sep 6, 2019 at 13:17


You must log in to answer this question.

Browse other questions tagged .