Reputation: 16114
I have set Game Center Achievements with percentage values, and am now trying to reset them to 0. I called
GKAchievement.resetAchievementsWithCompletionHandler({
...
}
and checked to see that there was no error. Everything seems to be running correctly, yet the achievements do not reset. I have tried rerunning the app, resetting the Simulator, and signing in and out of the same account.
Upvotes: 2
Views: 745
Reputation: 11091
Game Center will keep the higher score and it will not overwrite it with a lower score. When the function below is called,
GKAchievement.resetAchievementsWithCompletionHandler
it resets the achievements for the local player. However, it will not lower the score (or percentage you have in game center). This is an excerpt from Apple's API doc for resetAchievementsWithCompletionHandler
- "Calling this class method deletes all progress towards achievements previously reported for the local player.". Here is a link to the complete API doc.
In other words, if you have submitted a score of 10%, and you try to reset it to 0%, Game Center will keep only the high score.
This is only for scores you have submitted to Game Center. As the statement above suggests, the local player can be modified, so testing can be done with it.
Upvotes: 2