Submitting Scores

When authenticated with Game Center, you are ready to begin submitting scores. In the IFCGameCenterManager class there is a method called reportScore:forCategory. This allows you to post a new score for the Leaderboard ID that was configured in iTunes Connect. All new scores are submitted by creating a new GKScore object; this object holds onto several values such as the score value, playerID, date, rank, formattedValue, category, and context.

When a new score is submitted, most of this data is automatically populated. The value and category are the only two required fields. An optional context can be provided which is an arbitrary 64-bit unsigned integer. A context can be used to store additional information about the score, ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.