0

使用 Apple 提供的代码时,

- (void) reportAchievementIdentifier: (NSString*) identifier percentComplete: (float) percent
{
    GKAchievement *achievement = [[[GKAchievement alloc] initWithIdentifier: identifier] autorelease];
    if (achievement)
    {
  achievement.percentComplete = percent;
  [achievement reportAchievementWithCompletionHandler:^(NSError *error)
   {
    if (error != nil)
    {
     NSLog(@"problem with reporting");
     NSLog(@"%@",[error localizedDescription]);
     // Retain the achievement object and try again later (not shown).
    }
   }];
    }
}

我得到错误:

由于与服务器通信时出错,请求的操作无法完成。

我已经验证了用户,并且似乎注册了我玩过游戏,但它无法记录成就。有任何想法吗?

4

2 回答 2

0

来自itunesconnect 的成就需要几分钟才能传播到服务器。稍后再试,再次卸载和安装应用程序也不会受到伤害。

于 2010-12-05T21:26:36.757 回答
0

尝试使用 Apple 的可达性示例应用程序来确定 iPhone 是通过 wifi 还是 3G 连接到 Internet。http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html

于 2010-11-30T07:00:19.727 回答