Partially Earned Achievements

In the previous example, the achievement was either fully earned or not earned at all. The next achievement that will be implemented into Whack-a-Cac is com.dragonforged.whackacac.score100. Unlike the Kill One achievement, this one can be partially progressed, although it is nonstackable between games. The user is required to score 100 points in a single game. The process begins the same way as the preceding example, in that a reference to the GKAchievement object is created.

GKAchievement *score100Achievement = [[ICFGameCenterManagersharedManager] achievementForIdentifier:@"com.dragonforged.whackacac.score100"];

A quick test is performed to ensure that the achievement is not already ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.