How to save progress (collected coins, gems, etc.) and be able to transfer it to any device?
I would like to know how to save the user's progress such as current amount of gold, gem, etc. and be able to keep it when the user uninstall and reinstall again, and when the user change the device?
Basically, the user can obtain gold during the game and when they purchase using IAP. They can use the gold also to buy something such as costumes, power ups, etc.
The user has 100 gold so far from the game.
Purchase 100 gold for $1.00 from IAP.
Buy the new costume for 125 gold.
Current gold balance is 75 gold.
How do I save this 75 gold so when the user uninstall and reinstall again (or when the change to a new device), they can get back to their last gold state?
What method can I use? I am thinking maybe game center/ platform, but it looks like it is for achievement with milestone.
Can it also be used to save the balance of gold, gem, etc? If yes, how?
Is my understanding correct that (example: my IAP item "100gold" is consumable item)
when the user purchase this IAP item:
- Call behaviour IAP Buy Item,
- Add the 100 gold to the user's gold balance,
- Call the behaviour IAP Consume Item
All almost at the same time (in sequence) so the user can immediately purchase again if they need to.
Is my understanding correct?
Please advise. Any help is very much appreciated for the correct understanding.