Does iPhone support WiFi ad-hoc mode? - iphone

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.

Related

Third party apps in Apple Watch without internet

I'm trying to compare the possibilities of use beetween Apple WatchOS and Android Wear when it comes to using them without the phone nearby. And without conection to internet (Wi-Fi).
I own a Android Wear and have tested the possibilities but cant get an Apple Watch and all the info I can find is this: https://support.apple.com/en-us/HT205547
It says that with wifi you can: Use apps that support Wi-Fi. But what does it mean to support Wi-Fi? Does that mean third party apps cannot be used without internet in any case?
Thanks very much for the help!
Third party apps can run on watchOS without a network connection even if the Watch is not connected to the paired iPhone.
That piece of documentation you linked is only showing which system apps can be used without being connected to an iPhone with/without network connection.
If your watchOS app is not network based, it can fully function even when the Watch is not connected to the iPhone and there are no known Wifi networks available.

Communication between iOS app in one Wi-Fi network w/o server

I need to communicate my app with 2 devices. A restriction is that I can't use a server but all iOS devices will be in one Wi-Fi network. What options do I have? How I can send a message to another copy of my app running on another device?
I dont know whether its a correct approach or not but as you cannot use server,so the approach i can think of is we can create a socket connection using TCP/IP or UDP(based on reliability) for data exchange.
I dont think you can communicate between 2 devices running the same application without having some kind of server application in-between.
Even if you could find the other device over the WIFI I dont think you can tell if the other device is running the app or not.
I think you may be referring to MultipeerConnectivity
The Multipeer Connectivity framework provides support for discovering
services provided by nearby iOS devices using infrastructure Wi-Fi
networks, peer-to-peer Wi-Fi, and Bluetooth personal area networks and
subsequently communicating with those services by sending
message-based data, streaming data, and resources (such as files).
Source: https://developer.apple.com/library/ios/documentation/MultipeerConnectivity/Reference/MultipeerConnectivityFramework/
Apple Sample:
https://developer.apple.com/library/ios/samplecode/MultipeerGroupChat/Introduction/Intro.html

iPhone UDP ad hoc datas transfert

I'm trying to make an iPhone application to communicate with an other wireless device.
The other device can send datas via UDP sockets. I just want to know if it is possible to receive the informations on the iPhone, without access point on the network (just an iPhone and the wireless device), and how if it is.
I was looking at UDPecho, by apple, and I think it could be useful.
If anyone had some idea, just let me know what you're thinking about
iPhone 4 with iOS 4.3 can create a Wi-Fi network using the Personal Hotspot feature, which your "other device" could join.
A Verizon iPhone with 4.2.6 may also be able to do this.
Earlier iPhone models can't use the Personal Hotspot feature, regardless of the version of iOS.

Can we programmatically create a iPhone AdHoc Network?

Is it possible to create adhoc network programmatically in the iPhone, So that other device can connect to it?
Without jailbreaking it; no. If your phone is jailbroken and you want to know how to, Google has lots on it, but if that doesn't work out, update your question and be more specific.
GameKit uses either Bluetooth or Bonjour (WiFi but not adhoc), so it is not WiFi adhoc network.
You can not setup a standard WiFi adhoc network on the iPhone. However the GameKit allows for setting of peer-to-peer networks between iPhones.

Ad Hoc Wifi Connection Between iPhone & Mac - Possible?

I was just wondering if it is possible to set up a data transfer tunnel between an iPhone and a Mac using the Wifi hardware present on both devices? My main objective is to transfer data from my iPhone to my Mac through an app along an ad hoc wifi connection. If there are any other methods you would like to suggest, then please do.
Looking forward to your replies.
Thanks!
A.K.
You can make use of Bonjour, via NSNetServices and CFNetServices APIs.
Basically:
Create a server on the Mac
Announce the server via Bonjour
Browse Bonjour on the phone and resolve the bonjour service.
Establish connection
Exchange data via socket streams
You cannot automagically do this, yet. That is, you must manually create the ad hoc wireless network (a "computer-to-computer network" in Apple parlance) first on the Mac, then join the iPhone to it just like any other WiFi network. After this, the methods suggested above will work just fine.
What I think you are suggesting, also known as WiFi Direct, is a very new specification that is not yet supported by the iPhone or OS X (as of this writing).
You'd probably want to look at NSNetServices/CFNetServices (Bonjour) for a common API to accomplish that sort of connection.