草庐IT

GKTurnBasedMatches

全部标签

ios - 如何列出玩家所有可用的 GKTurnBasedMatches?

我正在使用GameCenter的回合制比赛构建游戏。我想显示所有可用匹配项的列表。我试过使用loadMatchesWithCompletionHandler(),但游戏数组返回为nil,错误也返回为nil。有一些正在进行的比赛。这是我目前所拥有的:funcauthenticateLocalUser(){if!gameCenterAvailable{return}letplayer=GKLocalPlayer.localPlayer()ifplayer.authenticated==false{player.authenticateHandler={(viewController,err