当桅杆类型为 GKPeerPickerConnectionTypeOnline 时出现异常
我正在使用 GKPeerPickerController ,我需要使用 wifi 发送消息,所以我使用以下代码
picker = [[GKPeerPickerController alloc] init];
picker.connectionTypesMask= GKPeerPickerConnectionTypeOnline;
picker.delegate = self;
,但是当我使用此以下错误时,
Terminating app due to uncaught exception 'GKInvalidArgumentException', reason: 'A GKPeerPickerController must support GKPeerPickerConnectionTypeNearby at a minimum.'
请帮助如何解决它?
I am using GKPeerPickerController , i need to send message using wifi , so iam using following code
picker = [[GKPeerPickerController alloc] init];
picker.connectionTypesMask= GKPeerPickerConnectionTypeOnline;
picker.delegate = self;
but when i use this following error occurs
Terminating app due to uncaught exception 'GKInvalidArgumentException', reason: 'A GKPeerPickerController must support GKPeerPickerConnectionTypeNearby at a minimum.'
please help how to solve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
错误消息是您的答案:根据 文档: “GKPeerPickerConnectionTypeNearby 必须是允许的连接类型之一。如果您的应用程序不包含它,则会引发异常。”
The error message is your answer: according to the docs: "GKPeerPickerConnectionTypeNearby is required to be one of the allowed connection types. An exception is thrown if your application does not include it."