xcode 重置游戏中心沙盒

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17009195/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:28:25  来源:igfitidea点击:

Reset Game Center Sandbox

iphoneiosobjective-cxcodegame-center

提问by Logan Shire

Is there a way to clear out all data from the Game Center sandbox and start fresh, save creating a new app ID? I have a bunch of games that have bad data from testing that I can't get rid of.

有没有办法清除游戏中心沙箱中的所有数据并重新开始,保存创建新的应用程序 ID?我有一堆游戏的测试数据不好,我无法摆脱。

回答by Xubing in China. Developer

yes.you can. In the GameCenter management in you app,you can find the delete test data button. hope this can help you .

是的你可以。在您的应用程序的 GameCenter 管理中,您可以找到删除测试数据按钮。希望这可以帮到你 。

回答by sqlexception

The trick above did not work for me. My game still shows an incorrect highscore leaderboard count of 41779 due to an incorrect grab of an int out of NSUserDefaults. I've requested the deletion of the test data multiple times and it's been over 24 hours already. Perhaps it's a unique occurance, but yeah.. deletion does not seem to be resetting the score on the sandbox GameCenter.

上面的技巧对我不起作用。由于从 NSUserDefaults 中错误地抓取了 int,我的游戏仍然显示不正确的高分排行榜计数 41779。我多次要求删除测试数据,已经超过24小时了。也许这是一个独特的事件,但是是的......删除似乎并没有重置沙盒游戏中心的分数。

If I'm missing anything, please share your 2 cents

如果我遗漏了什么,请分享您的 2 美分

回答by averem

If you want to reset achievements also try this code:

如果你想重置成就也试试这个代码:

[GKAchievement resetAchievementsWithCompletionHandler:^(NSError *error) {
    if (error) {
        NSLog(@"Error ===> %@", error);
    }
 }];