O'Reilly logo

Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch by 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

Handling Failures When Submitting a Score

If a score fails to submit, you as the developer are solely responsible for storing the score and resubmitting it when the error has been resolved. Nothing is more frustrating to a user than earning a new high score and losing it due to a network failure. This is also a step that Apple likes to test for during app reviews.

There are many different ways to store the score information for resubmitting it later; however, I feel that the following approach is the easiest for the novice to implement. Feel free to implement your own system if you feel that the provided one does not suit the needs of your app.

We will use NSKeyedArchiver to store our GKScore object for use later. The reason to serialize the ...

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