Do you know how the GKMatchmakerViewController handles a decline from a player (friend) who was listed in the "request.recipient" array?
Does Game Center then automatically hunt for some random player or does the match request fail?
I believe I found my answer in the Game Center Programming Guide under "Real Time Matches" (see below),
I guess a "match" will be returned after calling "findMatchForRequest" and I can then check whether the "match.expectedPlayerCount == 0" . If not zero then I guess I know some players provided in the "request.recipient" array did not accept the invitation. I can then either invite more friends (ie: call addPlayersToMatch and providing a new request.recipient array) or simply fill in the empty slots with random players (ie: call addPlayersToMatch but do not provide any request.recipient array information)
GAME CENTER PROGRAMMING GUIDE (REAL-TIME MATCH)
Because some of the invitations may not be accepted, it is possible you may receive a match that still needs more players. With this in mind, your custom user interface should implement the following behavior:
- The first time the player invites players to join the match, create the match request with those players and call the
method. Wait for the match to be returned (or cancel the request if the player cancels the invitations).findMatchForRequest:withCompletionHandler:
- If the player wants to add more players to the match after the invitations are processed, perform the same procedure again, but call the
method instead.addPlayersToMatch:matchRequest:completionHandler:
- If the player wants to automatch the remaining slots, create a match request but do not include a list of players to invite. Call the
method to fill the remaining slots. You must wait until all invited players have connected as all pending match requests are cancelled when automatching the remaining player slots.addPlayersToMatch:matchRequest:completionHandler:
- If the player wants to start the match with the players already in the match, call the
method to end matchmaking entirely.finishMatchmakingForMatch:
If you want to create a match that contains both invited players and automatched players, you must first create the match with the invited players. After all invited players have connected, you can then add players through automatching.