I have made a game which is supported by game center, it logs on the user and submits his score correctly, but I now need the game getting the score from game center, to let the user retrieve his score if he had to restore his device or to continue a match in a different device.
Sorry if the question is not correctly posted, could someone help please?
Thanks a lot!
I have made a game which is supported by game center, it logs on
Share
If the user logs in with the same game center ID, his scores will be synced automatically when you present the GKLeaderBoardViewController. The only thing I don’t understand from the question is “or to continue a match in a different device”.
GKLeaderBoardhas this method:which returns you an array of the scores, from there on, it’s up to you to experiment and pull the required score. A tip is to set the timeScope of the GKLeaderBoard to
GKLeaderboardTimeScopeAllTimeif you’re using the score as a counter.Also, if you’re just using the scores as a counter and nothing else, why not use iCloud to sync the progress between devices. It’s more automatic, and doesn’t require the player to have game center.