iphone – 使用playerToInvite的非朋友之间的游戏中心配对

这不可能吗?当我通过ID指定的两个玩家是朋友时,我尝试了一些成功进行匹配的测试代码,但是当他们不是这个时失败了.

使用GKMatchmaker findmatchforrequest

打印错误描述:

Error Domain=GKErrorDomain Code=8 “The requested operation could not
be completed because the player is invalid.” UserInfo=0x1dd62f40
{GKServerStatusCode=5121, NSUnderlyingError=0x1dd62ca0 “The operation
couldn’t be completed. Invitation between players who have not
recently played: G:1752931323, G:1752935955”,
NSLocalizedDescription=The requested operation could not be completed
because the player is invalid.}

最佳答案 我也希望能够做到这一点,但我相信苹果公司指定的文件邀请必须仅来自朋友.

点赞