Exercises

1. Implement a system of storing and resubmitting achievements if the Game Center servers are unreachable. Look at the approach used for leaderboards in Chapter 3 for guidance. Be sure to keep only the highest percentages complete in the offline cache.

2. Add a new achievement for hitting five cacti within one second. You will need to create some timers that track sequential hits. You can use the existing achievement identifier com.dragonforged.whackacac.hit5Fast.

3. Implement a custom display for your achievement progress using the information from the section “Going Further with Achievements” as a guide.

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.