O'Reilly logo

iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK by Joe Keeley, Kyle Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required