Reputation: 201
I' m working on a gamekit turnbased match. It's a wordgame in different languages.
The player has the option to set the language for every game he wants to play. I would like to use the GKMatchRequest's playergroup property to differentiate between the languages.
But after the GKMatchRequest has been sent and I receive a GKTurnBasedMatch object, how can I tell which playergroup (language) belongs to that match ? As far as I know, the GKTurnBasedMatch object doesn't have the playergroup property nor can I match a GKTurnBasedMatch object with a GKMatchRequest, there's no identifier.
Upvotes: 3
Views: 448
Reputation: 8050
Although there isn't a playerGroup
property in a GKTurnBasedMatch
object, I recommend storing the playerGroup of the match in the matchData
property.
Upvotes: 1
Reputation: 64
The GKTurnBasedMatch you receive is of the playerGroup you requested. If you set your playerGroup to 1, the GKTurnBasedMatch you get back will only pair up when someone else requests a match with a playerGroup of 1.
From the documentation: "If your application sets the playerGroup property, only players whose requests share the same playerGroup value are automatched by Game Center"
Upvotes: 0