首页 文章

在游戏中心沙盒中缺少邀请

提问于
浏览
4

我正在体验Game Center最奇怪的行为 .

我正在与 GKTurnBasedMatch 和朋友 Build 回合制比赛 . 本地播放器的身份验证工作完美 . 使用 GKTurnBasedMatch 类方法 loadMatchesWithCompletionHandler: 似乎合理地返回 GKTurnBasedMatch 对象 . 要发起新的比赛并邀请游戏中心的朋友,我使用标准 GKTurnBasedMatchmakerViewController .

当我使用 GKTurnBasedMatchmakerViewController 创建匹配时,它们会在 showExistingMatches 属性为 YES 时显示在那里,对于游戏创建者 .

但是,如果我邀请其他玩家使用 GKTurnBasedMatchmakerViewController ,则接收玩家永远不会收到邀请 . 没有游戏中心推送通知,并且没有(除了一次或两次,偶尔) GKTurnBasedMatchmakerViewController 中带有"Invited" Headers 的游戏 .

奇怪的是,如果发起用户随后结束他们使用邀请创建的游戏,则该玩家将收到“Game Over”游戏中心通知 .

使用 loadMatchesWithCompletionHandler: ,返回的 matches 对于邀请的玩家有意义( participant 中的 playerID 值正确, participant 上的 GKTurnBasedParticipantStatus 正确),但对于受邀玩家来说根本没有任何显示 .

我正在使用两个独立的设备,两者都肯定登录到Game Center的Sandbox模式,并且所有内容都在iTunes Connect中设置等 . 两个Game Center帐户都设置为接受邀请 .

有没有见过这样的人?

1 回答

  • 2

    可能的解决方案:当邀请者第一次移动,并且发送了消息 endTurnWithNextParticipants:turnTimeout:matchData:completionHandler: 时,我不是't sending the proper participants in the first argument, and so the turn was never set to be the invitee' .

相关问题