- Home /
Is there any way to restore consumable in-app-purchases after uninstalling the app?
Hi, I'm developing a mobile game (iOS and Android) with in-app-purchases for cosumable and non-consumable items. I know that non-consumable items are easy to restore at any point, since you can ask google or apple if they're purchased or not. But... is there any way to restore consumable items other than storing it in the server? (since the app doesn't have a server). Thank you for your time!
Answer by GameVortex · Mar 06, 2014 at 04:30 PM
Only way to know how many consumables the player has and how many they have used is to store it on your own server where the user needs to log in to play the game. Other than that there is no way of restoring consumables when uninstalling the app and removing the saved data as neither the Apple, the device or you know how many consumables the player has used since buying them. It is recommended to inform the player of this when buying consumables.
Ok, that's what I though, I was just wondering for any (ugly) workaround, but I think there aren't any. Thanks for your answer
Hi, so then, is there a example or tutorial to make that sort of server & database? to storing in app purchase consumable items? using unity3d and android/iOS
Answer by WagnerGus · Mar 12, 2017 at 07:26 PM
Ok, Ok, 3 years have gone. But considering this is a common question, I suggest taking a look in Unity Documentation - Restoring Transactions, where we find this:
"When a user reinstalls your application they should be granted any Non-Consumable or Subscription products they already own. App stores maintain a permanent record of each user’s Non-Consumable and Subscription products which Unity IAP can retrieve."
And this:
"On ... Google Play and Universal Windows Applications ... Unity IAP automatically restores any products the user owns during the first initialization following reinstallation..."
"On Apple platforms users must enter their password to retrieve previous transactions so your application must provide users with a button letting them do so..."
I hope this information can be useful.
Answer by SmartMirror · Feb 12, 2019 at 02:52 PM
Hi. I need “Consumable” product list for to restore. We use database for all purchased products. And when player buy a consumable product (like 10 gold) we save this purchase transaction's data to table in database.
For example; When user buy a “consumable” product client sent transaction data to server. But at the this point if the network close or phone close, and data does not sent to server user will not have gold. Because of this we need restore for all consumable product. How can I get purchased consumable list from Apple and Google Play ? Google play just restore non-consumable product when reload the app. but I need purchased consumable product list. I hope, I could explain what I need.
Thank you for your time!
Answer by Spitfire96 · Jul 08, 2020 at 05:22 AM
@Waliactico The app stores already store permanent information about user purchases. So I don't think you need to do further action because the purchased items will be automatically available.
Your answer
Follow this Question
Related Questions
In App plugins free 1 Answer
Restore Purchases complete event 0 Answers
Capturing and Save Live Camera Feed In Unity 1 Answer
how many computers does the android basic license cover 2 Answers
Embedded app in unity 0 Answers