【问题标题】:Game Center Achievement Issue游戏中心成就问题
【发布时间】:2015-10-16 19:26:44
【问题描述】:

我最近决定将成就添加到已在 App Store 上架多年的游戏中,但我无法让它们发挥作用。

我正在使用以下代码发布成就:

GKAchievement *achievement = [[GKAchievement alloc] initWithIdentifier: identifier];

[achievement setPercentComplete:100.0];

[GKAchievement reportAchievements:@[achievement] withCompletionHandler:^(NSError *error){

}];

但是reportAchievements 只是记录no bundle for bundleID: (null)

我想知道这是否与成就尚未上线以及 Apple 已移除沙盒服务器这一事实有关。但它们已在 iTunes Connect 中注册,我使用的是测试用户。

还需要注意的是,此应用是从其他开发者那里转移过来的。

对于我尝试使用的应用 ID:

  • com.olddeveloper.ach_id
  • com.olddeveloper.appid.ach_id
  • ach_id
  • com.newdeveloper.ach_id
  • com.newdeveloper.appid.ach_id

在转移之前一直存在的排行榜仍然有效,它使用旧的开发者 ID。

我什至尝试使用第一个答案here 中的代码获取所有成就的列表,但它仍然显示no bundle for bundleID: (null)

编辑:

我发现即使它显示no bundle for bundleID: (null),它仍然正确返回所有成就的列表。我认为此消息只是系统中的一些小故障,并且它仍然有效。

也就是说,我仍然无法使用任何 ID 组合解锁成就。

【问题讨论】:

    标签: ios app-store-connect game-center


    【解决方案1】:

    对我来说,问题是成就被解锁,但没有显示。我不知道有什么方法可以不显示该消息,但它是无害的。

    【讨论】:

    • Game Center 应用中根本不显示成就。苹果关于删除测试服务器的页面他们说成就和排行榜会在解锁时显示,即使它们还没有上线。
    【解决方案2】:

    我遇到了同样的问题。在调试器中小心地浏览我的代码,我开始弄清楚如果我使用 GKScore 而不是 GKAchievement ,警告消息就会消失。 所以拇指规则是检查你的成就和排行榜。使用 GKScore 而不是 GKAchievement。

    [ GKAchievement reportAchievements:achievements withCompletionHandler:^(NSError *error) {
        if ( error != 0 )
            NSLog( @"Reporting of %@ failed: %@", achievement, [ error localizedDescription ] );
    }];

    您还可以看到雷达。没有。 rdar://23149890

    【讨论】:

      【解决方案3】:

      我意外地尝试报告我的应用程序中未在 iTunes Connect 中配置的成就时收到了相同的错误消息。

      因此,以下步骤可能会对您有所帮助:

      1. 检查 iTunes Connect 是否缺少成就
      2. 检查您的成就 ID 是否有拼写错误

      【讨论】:

        猜你喜欢
        • 2012-04-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-07-30
        • 2012-12-22
        • 2012-06-27
        • 1970-01-01
        相关资源
        最近更新 更多