Game Development Reference
The score value is of type int64_t , which is the same as long long . That's right,
long long . The long data type is a 32-bit integer value whereas long long
means it's a 64-bit integer value, so it can store an incredibly large number—one with
19 digits. That allows for more than 4 billion times greater values than a regular 32-bit
integer can represent!
A temporary GKScore object is created and initialized with a leaderboard category
identifier, which you define in iTunes Connect. In this case, the category ID is Play-
time . The GKScore object also gets the score assigned, and then its reportS-
coreWithCompletionHandler method is called, which will transmit the score to
the Game Center server and to the correct leaderboard.
The delegate receives the onScoresSubmitted message and subsequently calls the
retrieveTopTenAllTimeGlobalScores method to get the top ten scores:
GameKitHelper* gkHelper = [GameKitHelper sharedGameKitHelper];
The GameKitHelper class's retrieveTopTenAllTimeGlobalScores
simply wraps the call to retrieveScoresForPlayers and feeds it with precon-