iOS Development: Should the "playersToInvite" property contain an array of strings or an array of GKPlayer objects?
Should the playersToInvite
property of 开发者_如何学编程the GKMatchRequest
object contain an array of NSString objects that hold the player id's or should it contain an array of GKPlayer objects? The documentation on this critical property is not clear at all and I've tried both ways, but my code isn't working, so I can't tell by experimentation.
Here's the description for that property in the docs...
A list of players to invite to the match.
Why did they even bother writing that?
Thanks for your help!
I believe this is answered with the Game Kit Programming Guide when it states:
The playersToInvite parameter is non-nil when your application is launched directly from the Game Center application to host a match. This parameter holds an array of player identifiers for the players to invite to the game
Have to agree with you regarding the GKMatchRequest docs - that's quite uncharacteristically poor of Apple.
精彩评论