I've implemented Multi-player in my IOS game using the standard matchmaking interface screen. Everything works well if I invite another player in the sandbox : the other player receives the push notification, the game is launched etc... and we can enjoy a cool multiplayer session.
The problem is when I try to use auto-match (without inviting a specific friend). I start the game on 2 devices, launch the same standard matchmaking interface screen and click on "play now" on both. Then I wait for 5 minutes before matchmakerViewController fails with the error: "The requested operation could not be completed due to an error communicating with the server"
Does it mean auto-match doesn't work in sandbox?
Thank you for your help!
here's my code:
- (IBAction) hostMatch:(id)sender
{
GKMatchRequest *request = [[[GKMatchRequest alloc] init] autorelease];
request.minPlayers = 2;
request.maxPlayers = 2;
GKMatchmakerViewController *mmvc = [[[GKMatchmakerViewController alloc] initWithMatchRequest:request] autorelease];
mmvc.matchmakerDelegate = self;
[self presentModalViewController:mmvc animated:YES];
}
Not sure what your problem might be without seeing the code, but auto-match definitely works on sandbox. For me the following does the trick:
GKMatchRequest *request = [[[GKMatchRequest alloc] init] autorelease];
request.minPlayers = 2;
request.maxPlayers = 4;
GKMatchmakerViewController *mmvc = [[[GKMatchmakerViewController alloc] initWithMatchRequest:request] autorelease];
mmvc.matchmakerDelegate = self;
[self presentModalViewController:mmvc animated:YES];