I'm trying to create a simple turn based 2 player game, but am struggling to understand how to use GKTurnBasedMatchmaker
Here's the steps I have so far:
- Authenticate Local Player
- Make my view controller the GKTurnbasedMatchmakerViewControllerDelegate
Present the matchmaking view controller like so:
self.match.minPlayers = 2; self.match.maxPlayers = 2; self.match.defaultNumberOfPlayers = 2; let mmVC = GKTurnBasedMatchmakerViewController(matchRequest: match); mmVC.turnBasedMatchmakerDelegate = self; self.view?.window?.rootViewController?.present(mmVC, animated: true, completion: nil);
I now have no idea what to do after this.
How can I tell if the matchmakerViewController successfully found a match and I should transition to the game?
The didFindMatch callback seemed like the obvious solution, but it's deprecated