Reporting Achievements

After an achievement cache has been implemented, it is safe to submit progress on an achievement. A new method reportAchievement:withPercentageComplete: will need to be added to the ICFGameManager class to accomplish this task. When this method is called, the achievement ID and percentage complete are used as arguments. For information on how to determine the current percentage of an achievement, see the section “Adding Achievement Hooks.”

When submitting achievement progress, the first thing that needs to be done is make sure that the achievementDictionary has already been populated. Making sure to check Game Center for the current progress of any achievements prevents users from losing progress when switching devices ...

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.