Handling a GKInvite and proceeding with the game

How to I receive and handle a GKInvite and create a GKMatch using that. I already have this code working:

Code Block
let matchRequest = GKMatchRequest()
        matchRequest.minPlayers = 2
        matchRequest.maxPlayers = 2
        matchRequest.defaultNumberOfPlayers = 2
        guard let matchMakingVC = GKMatchmakerViewController(matchRequest: matchRequest) else { return
        }
        matchMakingVC.delegate = self
        self.present(matchMakingVC, animated: true, completion: nil)


Also how do I continue if the match is ready to start and dismiss the GKMatchmakerViewController.

Thanks!
Answered by Krish Shah in 616272022
I have figured it out.
Thanks!
Accepted Answer
I have figured it out.
Thanks!
Handling a GKInvite and proceeding with the game
 
 
Q