Does iPhone support WiFi ad-hoc mode?

你说的曾经没有我的故事 提交于 2019-11-30 12:57:14

问题


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?


回答1:


Updated Answer:

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.

Legacy Answer:

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.

You can use Game Kit, CoreBluetooth (in limited circumstances), or you can use something like CocoaHTTPServer.




回答2:


Ad Hoc networking is supported on all iOS devices, but you can not create an ad hoc network from within your application. From the list of available networks, choose the ad hoc network you want to connect to, click the arrow and choose connect automatically. Now, your device will automatically connect to this network whenever it comes within range. After this you can use the connection using regular sockets or any other networking API.




回答3:


As of iOS 7 you can use the Multipeer Connectivity Framework to connect two iPhones without an existing network. The framework will use Bluetooth, Wifi infrastructure mode, or Wifi Adhoc mode. Unfortunately, you don't have the ability to choose a transport, the framework decides on what is best.




回答4:


No, stock iPhones do not support ad-hoc Wifi communication.

Yes, iPhones can connect to one another without an existing network, using Bluetooth (via the Gamekit API).




回答5:


IOS 6.1.3 on an iPad mini will connect to an ad-hoc network




回答6:


What you are describing is called Wifi peer-to-peer which iOS devices do not support at the moment.



来源:https://stackoverflow.com/questions/7057053/does-iphone-support-wifi-ad-hoc-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!