using 3G instead connected Wi-Fi on iPhone - iphone

all,
my iPhone application must be connected to the local network without Internet access via Wi-Fi and in the same time connected to Internet via 3G. It is possible to do programmatically?

No, this is not possible. iOS will use the fasted internet connect (by type) to connect to.
Maybe you could use VPN?

Related

iPhone WiFi connection withou access point

I'm working on a project in which I want to wirelessly connect two simplistic devices to an iPhone, however, I will not have a cellular connection and I do not want to use an access point. Is there a way to do it?
iPhone has a "Personal Hotspot" feature (you can turn it on in Settings) which transforms the phone into a wifi access point. so you can then let other devices connect to it.

Simultaneous wifi and 3G connection on mobile

I am developing a peripheral that uses WiFi and Embedded browser, the peripheral looks like an access point to iPhone (and android) but it is not connected to internet. When I connect my phone to this peripheral via Wifi, I loose internet connection on the phone using 3G.
Is there a way to avoid this? I have control over the software of the peripheral so I can change the IP addresses, gateways etc.
Are you going to connect your peripheral to the internet via iPhone's 3G network? If so, why don't you use iphone's Personal hotspot feature?
I believe you can't have both wifi & 3G connection without using Personal hotspot mode.
You can only simulate 3g on your device. In iOS 6 or higher open Settings->Developer->Network Link Conditioner-Status-Choose what you want.

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

use 3g for internet when connected to adhoc wifi (using private API's)

First and foremost,
I am looking for a resource to use Private API's.
this is an enterprise application and will never go to the app store
I need to take as much configuration out of the users hands as possible.
That being said, I have a device that an ipad will be connected to and communicate with via an adhoc wifi network supplied by the device. the ipad connects to this device and sends raw data to it via socket connections. I also need to connect to the internet for data syncing.
80% of the time, the ipad will be connected to this adhoc wifi device. Management software on the ipad does not allow the user to adjust wifi settings so I am trying to make sure I am connected to my device without limiting my server syncing. I know I can determine the connection using apples Reachability class, this is not what i am looking for. I need to use BOTH 3g AND wifi.
Is there a way to enforce this in code? Or is there a resource for the private API's that I can look at to find a way?
This will be in iOS 5 and the most preferable method would be to just route my http requests via some private api method to use 3G and let the socket requests use wifi to the adhoc device.
code samples would be awesome, links / class names to research would be very much appreciated.
and once again this is not going into the app store, it is an enterprise app
the resolution i found was to assign an ip in the privately assigned ip range the ipad uses (169.254.x.x) to the adhoc device then let the ipad determine an ip. Then see if i can open a socket connection to the device (to determine if its available) and then issue a print.
Going this route, i am still able to use 3g data as well as communicate with the device via wifi.

Change iPhone internet connection mode programmatically

I want to know if there is a way of changing the internet connection mode from GPRS to WiFi and vice-versa programmatically. I am developing one application and want to give liberty to users which internet connection mode they want to use for my application. Also is there any other connection mode available apart from WiFi and GPRS?
Not with a public API.
There's also Bluetooth connectivity, which is used for GameKit and also automatically used for device-to-device Bonjour.