我正在尝试使用Game Center创建一个实时多人游戏 . 对于配对,我使用以下代码使用编程方法:

[[GKMatchmaker sharedMatchmaker] findMatchForRequest:request withCompletionHandler:^(GKMatch *match, NSError *error) {
        if (error)
        {
            // Process the error.
            NSLog(@" error => %@ ", [error userInfo] );

        }
        else if (match != nil)
        {
            NSLog(@"Match Found _-----------");
            currentMatch = match;
            match.delegate = self;

            NSLog(@"Expected player count:%ld",match.expectedPlayerCount);

            if ( match.expectedPlayerCount == 0)
            {
                NSLog(@"Ready to start match!");

            }
        }
    }];

目前,代码在找到匹配项时会生成以下错误:

ABC-mobile[342:26698] [log]  [ERROR] ReXmitCollectionRequest:640 /BuildRoot/Library/Caches/com.apple.xbs/Sources/AVConference/AVConference-1020.31/ICE.subproj/Sources/ICEMessage.c:640:     ReXmit [SNATMAP_REQUEST] (1:0) from [192.168.0.104:16402] to [17.133.234.32:16384] failed (801A0002)

ABC-mobile[342:26698] [log]  [ERROR] -[GKConnectionInternal internal_setRemoteConnectionData:fromParticipantID:pendingConnectionPIDList:]:1041 GCKSessionPrepareConnection FAILED(80150016)

我正在使用 Cocos2D-X 游戏引擎,我从 C++ 函数调用此方法 .

我将不胜感激任何关于这个主题的建议和想法 . 谢谢 .