【发布时间】:2012-09-11 10:20:31
【问题描述】:
我在我的 iPhone 游戏中使用 Game Kit,当我完成一个关卡时,我会检查如下成就:
if (timeSpentInLevel < 30) {
GKAchievement *ach = [[GKAchievement alloc] initWithIdentifier:@"cryptoquips.achievements.solutiontime.30s"];
ach.percentComplete = 100.0;
ach.showsCompletionBanner = YES;
if (ach != NULL) {
[ach reportAchievementWithCompletionHandler:^(NSError *error) {
if (error!= nil) {
NSLog(@"achievement reporting failed");
}
}];
}
}
但是当我在另一个关卡中再次执行此操作时,横幅仍然显示,我假设再次获得积分。在 iTunes Connect 中,我将成就“Achievable More than Once”设置为 no,因此不允许这样做。
如何防止此成就被多次授予?
【问题讨论】:
-
我也有这个问题,如何多次实现玩家?
标签: iphone objective-c ios app-store-connect gamekit