Search Unity

Get iTunes/App Store Apple ID associated with a purchase

Discussion in 'Unity IAP' started by OvilleWorld, Jul 6, 2019.

  1. OvilleWorld

    OvilleWorld

    Joined:
    Apr 4, 2018
    Posts:
    7
    Hi, is it possible to get some kind of reliable identifier for the itunes/app store apple ID account used to make an IAP?

    I want to apply that id to a membership subscription we hold in an online database.

    IAP reads receipts at startup, so a player with a subscription can log into their app store account on a friends device and that friend's game will have that membership applied.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    If a user logs in on another device, any previous purchases "should" be restored on the new device without any additional coding on your end. However, I believe that this doesn't work on IAP 1.22, so you would need to use a previous version.
     
  3. OvilleWorld

    OvilleWorld

    Joined:
    Apr 4, 2018
    Posts:
    7
    Thanks, that part works fine. I am asking about the opposite. To restrict a player "restoring" their purchases inside someone else's game - essentially granting all those purchases to another player.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No, you can't restore another user's purchases, for obvious security reasons. Perhaps you are asking if they are already restricted, then the answer is Yes, they are restricted to only the purchasing user.