Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c Cocoa touch-GameKit GKPeerPickerController设备_Objective C_Cocoa Touch - Fatal编程技术网

Objective c Cocoa touch-GameKit GKPeerPickerController设备

Objective c Cocoa touch-GameKit GKPeerPickerController设备,objective-c,cocoa-touch,Objective C,Cocoa Touch,我现在正在测试GKPeerPickerController。 我有一个简单的应用程序,只需在设备上安装一个按钮和一个PeerPickerController即可。 然而,它所做的只是“寻找其他iPhone或iPod触控…” 我确实在附近有另一台设备,蓝牙已打开,但没有安装应用程序。 其他设备是否也需要安装应用程序 谢谢, 发球是。另一台设备需要安装并运行该应用程序,才能让GameKit在代码中看到它。嘿,诺亚,谢谢你的回复。那么,什么决定了什么设备将显示?是包标识符名称吗?可能是的。我真的不知道

我现在正在测试GKPeerPickerController。
我有一个简单的应用程序,只需在设备上安装一个按钮和一个PeerPickerController即可。
然而,它所做的只是“寻找其他iPhone或iPod触控…”

我确实在附近有另一台设备,蓝牙已打开,但没有安装应用程序。
其他设备是否也需要安装应用程序

谢谢,

发球

是。另一台设备需要安装并运行该应用程序,才能让GameKit在代码中看到它。

嘿,诺亚,谢谢你的回复。那么,什么决定了什么设备将显示?是包标识符名称吗?可能是的。我真的不知道其内部结构,但任何运行你的应用程序并通过蓝牙广播其存在的设备都应该显示在你应用程序附近任何其他实例的对等选择器控制器中。默认情况下,它是用于匹配设备的包ID,但您可以通过-(GKSession*)peerPickerController:(GKPeerPickerController*)picker sessionForConnectionType:(GKPeerPickerConnectionType)类型GKPeerPickerController委托方法将适当配置的GKSession对象传递回GameKit,从而将其更改为任意字符串。