Search code examples
iosgame-centergame-center-leaderboard

iOS GameCenter: Send scores from server


Currently, I have created a game, which shares data with a server backend. This server also validates and stores player data, for example high score.

Is it possible to send scores to GameCenter via my server backend? If yes, how?

Sure, I could send the high score from my server to the client and then let the client push the data to GameCenter, but this would make it easier to cheat.


Solution

  • In short: no.

    Access to Game Center has to go through the GameKit.framework which is only available on iOS and OS X.

    Furthermore, players need to be authenticated. Therefore a single server can't send scores etc. on behalf of the players even if it were running on OS X because only the server's identity could be used to send and update scores etc. So even if your server were OS X and you had a proxy app communicating with the client and Game Center it wouldn't work because there would only ever be one client sending scores. A leaderboard with one entry (the best score among all players) wouldn't be of much help.