Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

IOS Restore Data even after Deleting App

Discussion in 'Scripting' started by downhilldan, Apr 28, 2017.

  1. downhilldan

    downhilldan

    Joined:
    Nov 16, 2016
    Posts:
    90
    Hi all,

    I submitted my app for review on IOS through iTunes Connect recently and they sent me a question regarding my store. "How can a user restore the items that are purchased with coins?" (along with the attached screenshot). I noticed games like Temple Run 2 for example, somehow save data even if the app is deleted and reinstalled. Is this what they are referring to with this question? If so, how do I achieve this? I am currently using data serialization to save my data but it doesn't keep the data after the app has been deleted and reinstalled.

    Ps. This is unrelated, but my app listing in Google Play has "(Beta)" after the title, yet is a production build. How to I remove this?

    Thanks in advance!
     

    Attached Files:

  2. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Are your coin IAPs consumable products? If so then that's a strange thing for them to ask because loads of games allow purchasing in game items with consumable currency without any restore. In my experience restore is only needed for non-consumables.
     
  3. downhilldan

    downhilldan

    Joined:
    Nov 16, 2016
    Posts:
    90
    They are consumable so I am a bit confused also o_O
     
  4. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,186
    iOS requires any non-consumable to be restorable. For example, if I buy a bundle of coins for cash. This is a consumable product and will not be restored.

    However, if I buy a map for cash, then I have to be able to restore the map.

    Now, the other area is what happens if I buy coins (consumable) and then use the coins to unlock a map (non-consumable). I believe for iOS this still has to be restored. (Apple tends to have policies that aren't always clear)

    Usually for a situation such as this, an account would be created that would keep track of unlocked items. For example, either by email or tied to a Facebook/google account so that if I have to switch devices, I can just recover my data by logging in to my account.

    I think Apple can do restores, but only on non-cosumables bought directly from the store with cash.

    And here is the part from Apple about why you need a restore funtion

    I will also say that Apple can be confusing. We had an app out for about a year, then suddenly they flagged something on the app and told us to fix it despite the fact the part they were mentioning had been the same for the year while it was out. (policy may have changed, but it was odd)
     
    Kiwasi and downhilldan like this.
  5. downhilldan

    downhilldan

    Joined:
    Nov 16, 2016
    Posts:
    90
    Ok, so would integrating Game Center work for this instead of google/facebook? Unity Game Center Doc

    And if that doesn't work is this what I would use for a Google sign in?
     
    Last edited: Apr 29, 2017
  6. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,186
    I know about game center on iOS, but game center I don't think works on Android. Google I believe does work on both. You could look at the social api that unity uses, but I'm not sure what data it lets you save. It uses either the Google games or the Apple game center, depending on the device.

    We use playfab for our backend. It has a free tier that works great and would probably be fine for your use. It's fairly easy to setup. You will still have to include anonymous login (easy setup with playfab) but then to allow the user to create an account you could tie it into Facebook or just an email account or whatever other services they offer for account linking.