Matching Programmatically

It is also possible for your app to find matches programmatically, without using the matchmaker interface. You could use this methodology to implement your own custom GUI for matchmaking or create an “instant match” type action, in which users are automatically paired and a game begins with no additional user interaction. We will not be using this style of matchmaking in our demo app, but the following method will allow you to implement a match programmatically.

- (void)findProgrammaticMatch {         GKMatchRequest *request = [[GKMatchRequest alloc] init];         request.minPlayers = 2;         request.maxPlayers = 4;         [[GKMatchmaker sharedMatchmaker] findMatchForRequest:request  withCompletionHandler:^(GKMatch ...

Get Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.