I would like players to purchase consumables, and have the current amount of those consumables available on any iOS device that the player is on
The path I started down is this:
Player logs in with gamecenter
Player creates an account on my server and logs into my server through my game
then the player can purchase consumables through their itunes login, then my game tells the my server about the purchase.
As the player uses these items, their current state is updated on my server. Then when the user switches devices, he can simply log in to my server using credentials that my server understands and I can pass back any info about consumables. Only when a purchase occurs does the user have to log in with itunes credentials… I think this may not be the correct way to do it…
How would I go about identifying an individual from their itunes login so that the player does not have to create an account on my system. I am not trying to secretly get any info about the player, I just need a unique way to identify him in order to send back and update the current state of consumables.
Any ideas on this?
Thanks!
[edit] I might be answering my own question… Looks like I can get a playerID out of the GKPlayer class by using the following call in corona:
gameNetwork.request( “loadLocalPlayer”, { listener=requestCallback } )
I think that is all I need. I’ll try it out and see how it goes!