简体   繁体   English

GKPeerPickerController已在iOS 7中弃用

[英]GKPeerPickerController has been deprecated in iOS 7

I need the functionality that allows data exchange over blue-tooth between two devices. 我需要允许在两个设备之间通过蓝牙进行数据交换的功能。 I know that GKPeerPickerController is used for this purpose. 我知道GKPeerPickerController用于此目的。 But this class has been deprecated since iOS 7. Both Internet search and documentation say nothing about what to use instead (as it usually does). 但是自iOS 7以来,这个类已被弃用。互联网搜索和文档都没有说明要使用的内容(通常如此)。 Any suggestions? 有什么建议?

GKPeerPickerController Class Reference GKPeerPickerController类参考

Ok, I'll answer my own question. 好的,我会回答我自己的问题。 From apple docs: 来自apple docs:

The Multipeer Connectivity framework (MultipeerConnectivity.framework) supports the discovery of nearby devices and the direct communication with those devices without requiring Internet connectivity. Multipeer Connectivity框架(MultipeerConnectivity.framework)支持发现附近的设备以及与这些设备的直接通信,而无需Internet连接。 This framework makes it possible to create multipeer sessions easily and to support reliable in-order data transmission and real-time data transmission. 该框架使得可以轻松地创建多路径会话并支持可靠的有序数据传输和实时数据传输。 With this framework, your app can communicate with nearby devices and seamlessly exchange data. 借助此框架,您的应用可以与附近的设备进行通信,并无缝地交换数据。

The framework provides programmatic and UI-based options for discovering and managing network services. 该框架提供了用于发现和管理网络服务的基于程序和UI的选项。 Apps can integrate the MCBrowserViewController class into their user interface to display a list of peer devices for the user to choose from. 应用程序可以将MCBrowserViewController类集成到其用户界面中,以显示对等设备列表供用户选择。 Alternatively, you can use the MCNearbyServiceBrowser class to look for and manage peer devices programmatically. 或者,您可以使用MCNearbyServiceBrowser类以编程方式查找和管理对等设备。

For more information about the interfaces of this framework, see Multipeer Connectivity Framework Reference . 有关此框架的接口的更多信息,请参阅Multipeer Connectivity Framework Reference

This class is avilable since ios7. 从ios7开始,这个课程是可用的。 That's fine but I think they could have given a link to this class in GKPeerPickerController near the deprecation message. 这很好,但我认为他们可以在弃用消息附近的GKPeerPickerController中给出这个类的链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM