草庐IT

iphone - iOS 开发 : Should the "playersToInvite" property contain an array of strings or an array of GKPlayer objects?

coder 2024-01-28 原文

GKMatchRequest 对象的 playersToInvite 属性应该包含一个包含玩家 ID 的 NSString 对象数组,还是应该包含一个 GKPlayer 对象数组?关于这个关键属性的文档根本不清楚,我已经尝试了两种方法,但我的代码不起作用,所以我无法通过实验判断。

这是文档中对该属性的描述...

A list of players to invite to the match.

他们为什么还要费心写那个?

感谢您的帮助!

最佳答案

我相信这可以用 Game Kit Programming Guide 来回答当它说:

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

必须同意您关于 GKMatchRequest 文档的看法 - 这对 Apple 来说非常糟糕。

关于iphone - iOS 开发 : Should the "playersToInvite" property contain an array of strings or an array of GKPlayer objects?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4634944/

有关iphone - iOS 开发 : Should the "playersToInvite" property contain an array of strings or an array of GKPlayer objects?的更多相关文章

随机推荐