I assume that when you say "normal matchmaking" that you introduced matchmakerviewcontroller:
-(IBAction)setupMatch:(id)sender{ GKMatchmakerViewController *matchViewController = [[GKMatchmakerViewController alloc] initWithMatchRequest:matchRequest]; matchViewController.matchmakerDelegate = self; [self presentViewController:matchViewController animated:YES completion:nil];}
Then, when players are found in matchmakerviewcontroller, FFFMMMatch will be called:
-(void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)match{
didAcceptinvite is only called on the device of the recipient of the invitation after they accept the invitation:
-(void)player:(GKPlayer *)player didAcceptInvite:(GKInvite *)invite{ //Called on the accepting device when the invitation is accepted GKMatchmakerViewController *mmvc = [[GKMatchmakerViewController alloc] initWithInvite:invite]; mmvc.matchmakerDelegate = self; [self presentViewController:mmvc animated:YES completion:nil];
}
This presents matchmakerviewcontroller to your friend. They have nothing to do, vc establishes a connection and then fires itself. Vc on the senders device is simultaneously fired.
Then didFindMatch is called on both devices and quits.
I'm not sure what didrequestMatchWithRecipients is ever called and seems redundant when didFindMatch and didAcceptInvite deal with starting the game from both ends.
I found this video from WWDC 2012 really useful: WWDC 2012 Christy Warren
source share