iPhone是否支持WiFi ad-hoc模式? [英] Does iPhone support WiFi ad-hoc mode?
问题描述
iPhone是否支持ad-hoc网络模式? iPhone可以在不需要现有网络的情况下相互连接吗?如果是这样,我如何在我的应用程序中创建一个Ad Hoc网络?
Does the iPhone support ad-hoc network mode? Can iPhones connect to one another without requiring an existing network? If so, how can I create an Ad Hoc network in my app?
推荐答案
更新的答案:
看看 MultiPeer连接框架(文档链接)。NSHipster 写得很好在它上面(链接)。虽然您无法直接访问网络,但您可以轻松地在设备之间传输数据,甚至可以使用其他设备作为附近其他设备的中间人。
Have a look at the MultiPeer Connectivity Framework (documentation link) introduced in iOS 7. NSHipster has a nice write-up on it (link). Although you don't get direct network access, you can easily pass data between devices, and even use other devices to act as middlemen to other devices nearby.
旧版答案:
iOS设备无法使用内置的设置应用或可用API制作点对点网络。但是,如果要在应用程序中的设备之间发送数据,则有三个选项。
iOS devices cannot make peer-to-peer networks using the built in Settings app or available APIs. However, if you want to send data between devices in your app you have three options.
您可以使用游戏套件,CoreBluetooth(在有限的情况下),或者您可以使用类似 CocoaHTTPServer 。
You can use Game Kit, CoreBluetooth (in limited circumstances), or you can use something like CocoaHTTPServer.
这篇关于iPhone是否支持WiFi ad-hoc模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!