有没有办法重置我的 GameCenter 沙盒帐户的成就进度?

发布于 2025-01-06 17:22:51 字数 121 浏览 1 评论 0原文

我有一个 GameCenter 沙盒帐户,测试了我的游戏,获得了成就等。 现在我做了一些改变,想再次测试赚取成就!

我是否必须创建一个全新的沙盒帐户,或者有办法重置我的帐户吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

万人眼中万个我 2025-01-13 17:22:51

以下代码来自 Apple 文档

- (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
   }];
}

另请查看 Apple 的示例项目 GKTapper

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.

赏烟花じ飞满天 2025-01-13 17:22:51
// 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. 
         }
     }];
}
// 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. 
         }
     }];
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文