GKTurnBasedMatch recognizes a play group
I am working on a match based game. This is a word game in different languages.
The player has the option to set the language for each game he wants to play. I would like to use the playgroupGKMatchRequest property to differentiate between languages.
But after sending a GKMatchRequest and receiving a GKTurnBasedMatch object, how can I determine which playgroup (language) belongs to this match? As far as I know, the GKTurnBasedMatch object does not have a playergroup property and I cannot map the GKTurnBasedMatch object to the GKMatchRequest, there is no identifier there.
Although the object playerGroup
does not exist in the object GKTurnBasedMatch
, I recommend storing the group of players in a match in a property matchData
.
The GKTurnBasedMatch you received belongs to the player group you requested. If you set playerGroup to 1, GKTurnBasedMatch you will be returned, only a couple, when someone else asks for a match with player group 1.
From the documentation: "If your application sets the playerGroup property, only players whose requests have the same playerGroup value are automatically launched by Game Center."