1
\$\begingroup\$

I have a quiz game, which i would like to integrate Game Center for. This is a "local" multiplayer game with the possibility to play six players per match.

Is it possible to submit scores to the Game Center leaderboard for all six players in this setup given that it is only one player, the one that owns the device, that is logged on to Game Center?

If so, how is that done?

\$\endgroup\$

2 Answers 2

0
\$\begingroup\$

You cannot submit scores to game center for multiple players on a single device without forcing the players to log in and out of their GC accounts.

When you report a score to a leaderboard you only pass in the leaderboard ID you want to report the score to, not the player ID.

\$\endgroup\$
0
1
\$\begingroup\$

As of iOS 7, it is now possible to submit scores for multiple players from one device. However, an app can do so only when ending the game, using the method -endMatchInTurnWithMatchData:scores:achievements:completionHandler: in the GKTurnBaseMatch class.

From the documentation about this method:

endMatchInTurnWithMatchData:scores:achievements:completionHandler:
Ends the match while submitting all of the scores and achievements.
Parameters:
...
scores
An array of GKScore objects containing the final scores for every participant in the match.
...
Availability
Available in iOS 7.0 and later.

\$\endgroup\$
3
  • \$\begingroup\$ What is no longer true? Are you referring to the accepted answer? \$\endgroup\$ Commented Apr 6, 2014 at 17:04
  • \$\begingroup\$ Yes. I have not had the chance to use the iOS 7 specific API I mentioned, but it should allow submitting scores for multiple players. \$\endgroup\$ Commented Apr 7, 2014 at 18:24
  • \$\begingroup\$ Sounds good, glad you answered with the latest info. I tried to edit your answer to make it stand on its own. Feel free to revert or improve, of course. \$\endgroup\$ Commented Apr 7, 2014 at 18:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .