开发者

Does iPhone support WiFi ad-hoc mode?

开发者 https://www.devze.com 2023-03-28 13:31 出处:网络
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?Updated Answ

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?


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.


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.


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.


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).


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消