How implement auto match of Game Center on iOS

298 Views Asked by At

I make the turn-based game on Game Center. When I search another user through auto-match function, does GameCenter search another user that this game was installed or user that have free time? Because when I implement auto match feature on turn based game, it returns null value, I want to know more detail about the auto match feature. If GameCenter searches the user that game was installed and the game is not famous, then I think that auto-match can't run. How can I implement auto-match feature programmatically? Following codes doesn't return any user of game center.

GKMatchRequest *request = [[GKMatchRequest alloc] init];

    request.minPlayers = 2;
    request.maxPlayers = 2;

    [GKTurnBasedMatch findMatchForRequest: request withCompletionHandler:^(GKTurnBasedMatch *match, NSError *error)

     {

         if (match){


             //[self performSegueWithIdentifier:@"GamePlayScene" sender:match];

             NSLog(@"match id: %@", match.matchID);



         }
     }];

Because it has very little info on sites for auto-match feature, so please help me for auto-match.

Thanks for your help.

0

There are 0 best solutions below