GameKit 无线网络连接?
我读到,从 iPhone OS 3.1 开始,GameKit 支持 wifi 连接。但文档指出:
“如果您的应用程序配置了 对等选择器允许互联网 连接,您的应用程序必须 还解雇同行选择器和 提供自己的配置界面 互联网连接。”
这仍然有效吗?如果是这样,我如何建立可由 GK 使用的 wifi Bonjour 会话?(我只对使用本地网络感兴趣。)
I've read that as of iPhone OS 3.1, GameKit supports wifi connections. But the documentation states:
"If your application configures the
peer picker to allow Internet
connections, your application must
also dismiss the peer picker and
present its own interface to configure
an internet connection."
Does this still stand? If so, how do I establish a wifi Bonjour session that can be used by GK? (I'm only interested in using the local network.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的 GKSession 对象将自动处理通过 WiFi 或蓝牙发现的对等点,并找到任一协议上可用的对等点。
该文档指出,与蓝牙不同,GKPeerPickerController 提供了一个 UI 来启用蓝牙(如果尚未启用),GKPeerPickerController 不提供用于启用 wifi 或选择用户希望使用的网络的 UI,您必须提供您的自己的。
Your GKSession object will automatically handle the discovery of peers over WiFi or Bluetooth, and find those that are available on either protocol.
The documentation is stating that unlike Bluetooth, for which GKPeerPickerController provides a UI to enable Bluetooth if it's not already enabled, GKPeerPickerController does not provide a UI to enable wifi, or select the network the user wishes to be on, you will have to provide your own.
您可以使用GKPeerPicker类..有connectionTypesMask,它有属性
GKPeerPickerConnectionTypeNearby(用于蓝牙连接或无线)。更详细的可以看我原来的回答..
互联网上的游戏包
You can use GKPeerPicker class..There is connectionTypesMask,it has property
GKPeerPickerConnectionTypeNearby (for bluetooth connection or wireless). For more detail see my original answer..
gamekit over the internet