iphone - GKPeerPickerController 已在 iOS 7 中弃用

标签 iphone objective-c bluetooth ios7

我需要允许在两个设备之间通过蓝牙交换数据的功能。我知道 GKPeerPickerController 用于此目的。但是这个类从 iOS 7 开始就被弃用了。互联网搜索和文档都没有说明应该使用什么(通常是这样)。有什么建议吗?

GKPeerPickerController Class Reference

最佳答案

好的,我会回答我自己的问题。来自苹果文档:

The Multipeer Connectivity framework (MultipeerConnectivity.framework) supports the discovery of nearby devices and the direct communication with those devices without requiring Internet connectivity. 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. Apps can integrate the MCBrowserViewController class into their user interface to display a list of peer devices for the user to choose from. Alternatively, you can use the MCNearbyServiceBrowser class to look for and manage peer devices programmatically.

For more information about the interfaces of this framework, see Multipeer Connectivity Framework Reference.

此类自 ios7 起可用。很好,但我认为他们可以在 GKPeerPickerController 中提供指向此类的链接。在弃用消息附近。

关于iphone - GKPeerPickerController 已在 iOS 7 中弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18964021/

相关文章:

iphone - 转换一个描边的 CAShapeLayer

objective-c - GKSession connectToPeer 方法不会超时

java - 使用 Java 的蓝牙设备的电池电量

objective-c - 无缝循环视频

ios - 接收具有相同uuid和不同专业,副修背景的iBeacon

android - 如何从蓝牙条码扫描器Symbol CS3070读取数据到Android设备

iphone - ios sdk版本格式

iphone - 将 HTML 转换为 PDF 时出现额外空白页

iphone - 如何在隐藏控件时仅捕获 MPMoviePlayerController View 上的单击/点击?

ios - iOS7 bar标题过长时UINavigationBar后退按钮标题被隐藏