我是一名新手iOS开发人员,目前正在开发一款棋盘游戏。我想整合UIGameKit,但我遇到了麻烦。似乎总是无法自动匹配,并邀请朋友......
我确实检查了构建包ID,并且我在itunes connect中启用了gc,但仍然没有运气。当我在设备或模拟器上单击“立即播放”时,在超时之前没有任何反应。当我点击“邀请朋友”时,它也将失败并显示以下错误消息:
ERROR: {
GKServerStatusCode = 5008;
NSLocalizedDescription = "The requested operation could not be completed due to an error communicating with the server.";
NSUnderlyingError = "Error Domain=GKServerErrorDomain Code=5008 \"The operation couldn\U2019t be completed. status = 5008, missing required key: self-push-token\" UserInfo=0xae53360 {GKServerStatusCode=5008, NSLocalizedFailureReason=status = 5008, missing required key: self-push-token}";
我不明白我错过了什么游戏包所需的密钥?错误消息要求的自推令牌是什么?
(编辑备注:不要认为下面的代码是相关的,无论如何都会离开这里)
GKMatchRequest* request = [[GKMatchRequest alloc] init];
request.minPlayers = 2;
request.maxPlayers = 2;
GKMatchmakerViewController* hostVC = [[[GKMatchmakerViewController alloc] initWithMatchRequest:request] autorelease];
if (hostVC != nil)
{
hostVC.matchmakerDelegate = self;
[self presentViewController:hostVC];
}
有任何帮助吗?我试图找到一些好的样本来构建一个简单的游戏套件自动匹配应用程序,但没有任何运气,有没有人对我有建议?