6

I have a GameCenter Sandbox-Account have tested my game, earned achievements, etc. Now I've made some changes and want to test earning Achievements again!

Do I have to make an entire new Sandbox-Account or is there a way to reset my account?

col000r
  • 95
  • 1
  • 5
  • I think you're better off posting this on the [Gaming](http://gaming.stackexchange.com) site. – Mr Lister Feb 17 '12 at 10:13
  • 1
    I thought it was better to ask the developers since normal players never get a sandbox-account, but maybe it functions the same and I'd indeed be better off asking the players? – col000r Feb 17 '12 at 11:52

2 Answers2

12

The following code is from the Apple Documentation.

- (void) resetAchievements
{
   // Clear all locally saved achievement objects.
   achievementsDictionary = [[NSMutableDictionary alloc] init];
   // Clear all progress saved on Game Center
   [GKAchievement resetAchievementsWithCompletionHandler:^(NSError *error)
   {
      if (error != nil)
      // handle errors
   }];
}

Also have a look at Apple's sample project GKTapper.

0
// Reset all the achievements for local player 
- (void)resetAchievements
{
    [GKAchievement resetAchievementsWithCompletionHandler: ^(NSError *error) 
     {
        if (!error) {
             [storedAchievements release];
            storedAchievements = [[NSMutableDictionary alloc] init];

            // overwrite any previously stored file
             [self writeStoredAchievements];              
        } else {
            // Error clearing achievements. 
         }
     }];
}