Called when a player connects to or disconnects from the match.
- iOS 4.1+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
This method is called whenever a member of the match connects or disconnects.
GKMatch shows an example of how to check to see if a player has connected or disconnected from the match. The match delegate defines its own
match property to record whether the match is already in progress. If the match has not started and the count of expected players reaches zero, the method starts the match. In your game, this is where any initial match state would be transmitted to other players or where additional negotiations between the different participants take place.
Even before the match starts, all players already connected to the match can already exchange data with each other. This allows your game to create voice channels (or your own user interface) that allows the players already there to communicate with each other.