GKTurnedBasedMatchmakerViewController

Apple provides a default class to present the GUI for creating a new turned-based match. For programmatically creating a match, see the later section “Programmatic Matches.”

We begin by working with a new matchmaker object in the IBAction for the single button that we created in the previous section. The approach that we use here is very similar to iOS 4 Game Center matchmaking. We first alloc and init a copy of GKMatchRequest and set the minimum and maximum players. We then create a new GKTurnedBasedMatchmakerViewController and init it with the match object that we just created. Finally, we set the delegate to self and present the view modally to the user. The user will be presented with a view similar to ...

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.