I have a 2-player, iOS turn-based game that uses the game center and GKTurnbasedMatch.
Is there a way to programmatically rematch an opponent after a match has finished?
I would like to give the players one-button access to starting a new match with each other.
If there is not a one button approach, what are some potential alternatives?
Indeed it appears a full programmatic solution is being ignored by Game Center. A pain, no doubt. Try the following in your @selector(doRematchTap)... or some equivalent:
Important to note the showExistingMatches = NO, which will jump the view controller right into matchmaking mode with the correct user pre-selected (it seems), and not show the user's existing matches.
I don't have the whole solution, but a idea for you:
Every Player has a unique player-ID, that you can get, if you store it away after a
didReceiveData:(NSData *)data fromPlayer:(NSString *)playerID
Now you can start programmatically a new match and invite this player. He will be asked if he wants a rematch and then you can play again.
I know this is not much of code or concrete advise, but maybe it's enough information to find the rest in the GameKit Class Reference.
I wonder if you can work it out, tell me if you did and good luck!
Edit:
I have searched in the references and found this:
I didn't tried it out myself, but you should get the player this way again, if you store his identifier in an array and pass it to this function.
I hope they bring some changes in iOS6 for Game Center, that you can make your matches programmatically in your own way...