I\'m trying to invite nearby players to a match, but the invite is either never sent or never received.
GKMatchMaker startBrowsingForNearbyPlayersWithHandler works
I know this an older post, but I ran across it when trying to establish a connection between several app instances over the internet. I believe the part you're missing is that after registering for the listener, you need to receive the connected status with
- (void)match:(GKMatch *)match
player:(GKPlayer *)player
didChangeConnectionState:(GKPlayerConnectionState)state
{
NSLog(@">>> did change state");
if (state == GKPlayerStateConnected)
{
NSLog(@">>>> match:%@ did change to Connected for player %@ ",match, player.displayName);
}
else if (state == GKPlayerStateDisconnected)
{
NSLog(@">>>> match:%@ disconnected for player %@ ",match, player.displayName);
}
I find the match has 0 players when the completionHandler is called from findMatchForRequest:, but that I can successfully use the GKMatch and GKPlayer as returned in didChangeConnectionState: Hope that helps someone who reads this long after the OP.