iOS游戏中心GKTurnBasedMatchmakerViewController - 有时工作,其他人失败

时间:2017-11-14 02:57:32

标签: ios game-center gkturnbasedmatch

我正在研究基于回合制的匹配应用Wordiamo。它通过Game Center联网。我在通过GKTurnBasedMatchmakerViewController邀请新玩家时遇到问题。我部署它:

    let request = GKMatchRequest()
    request.minPlayers = 2
    request.maxPlayers = 2

    let mmvc = GKTurnBasedMatchmakerViewController(matchRequest: request)
    mmvc.turnBasedMatchmakerDelegate = self
    mmvc.showExistingMatches = false

    self.delegate = delegate
    self.presentingViewController.present(mmvc, animated: true, completion: block)

启动视图控制器后,当我按邀请朋友时,有时它工作正常(可能是30-50%的时间),显示一个消息邀请。但很多时候它会返回以下错误:

错误Domain = ExtensionErrorDomain Code = -5900“(null)”:无法完成操作。 (ExtensionErrorDomain错误-5900。) 2017-11-13 17:53:10.616581-0800 Wordiamo [7733:1484145] viewServiceDidTerminateWithError :: Error Domain = _UIViewServiceInterfaceErrorDomain Code = 3“(null)”UserInfo = {Message = Service Connection Interrupted}

任何可能导致这种失败的想法只会在某些时候发生?感谢。

0 个答案:

没有答案