Is it possible to utilize carrier data and WiFi connections simultaneously within an App? - ios

The theory in question is that I have a device that emits its own WiFi network. In order to communicate with this device, you must be connected to that WiFi network, but as it does not provide internet, your connection options are blocked.
What would be ideal, is to connect to this device, collect data from it, and transmit/push this data to a server located online via whatever means.
This question has been asked before, but the responses and questions I found were a few years old, and the OS has been updated a few iterations since then.
Is it possible, via Swift or Objective C within a mobile iOS app to utilize the connection of WiFi, but use carrier data to transmit that collected data?

I would use the BlueTooth API for this. However, there are two restrictions: 1) you cannot connect to a BlueTooth device in a captive network, and 2) you will not be able to connect to Android devices via BlueTooth.

Related

Connecting 30 iPads

I am currently programming an app for my school.
During the lesson the teacher needs to send and stream data to the students. There is a case in which one of the students streams the data to everyone else. The teacher uses an iPad and every student uses one.
My question is: How could this be realized without a local network or an internet connection?
Two solutions came to my mind when thinking about it:
Multipeer Connectivity. The problem with this solution is the limit to 8 devices. I have read that you can open multiple sessions at a time but I am worried that 30 devices are too many.
Having the teacher-iPad open a hotspot which the other iPads join. This hotspot will be used as a local network to communicate (as far as I know, this works on Minecraft PE). This would only be an option if the hotspot and it's password could be configured by the app, otherwise it would be too complicated to use in a lesson.
Thanks a lot for reading my text. I hope that you can help me.
Your devices need to transmit using wifi or bluetooth. I have a recollection that MCSession stopped being able to use bluetooth a few years ago. MCSession may work only if all devices are on the same wifi network.
Probably you can first use Multipeer Connectivity to setup the network, then use a hotspot or other solution afterward.
For example, using Multipeer Connectivity to send the wifi name and password to other devices. Once a device receives the setup information, you can disconnect it so that other devices can get connected.

What's the best way to exchange data between devices locally?

I want to send data from 4-7 iPads to a MacBook and back for an application I plan on making that uses all devices and I want to avoid using a server for exchanging data. Also I would like to avoid connecting the devices over a local wifi network, as I would like my application to work regardless of wifi availability.
Is there a way of doing this using Bluetooth or a wired solution? Or maybe something else?
I think your best way is using apple Multipeer Connectivity, you can connect up to 7 nearby devices via Bluetooth, Wifi, or creat a local Wifi: https://developer.apple.com/reference/multipeerconnectivity

Data Transfer between iOS and PC over WiFi

I Need to create an iOS application and a PC application, the two need to be able to exchange data over Wi-Fi (either direct or via a wifi router).
The iOS app will act as a remote control for some of the features of the PC app, for instance, if a video is playing on the pc application then the iOS app will have buttons to control playback on the PC such as play, pause, stop etc, when one of these buttons is pressed then I need to send some bytes to the pc over wifi.
My questions are:
how should I go about sending data - Wifi direct or via wifi network that both devices are connected to?
can anyone help with example code to connect or send data to a specific device over wifi for either methods?
to be clear, I don't need help with creating the applications themselves - only the wireless transfer of data between the devices using the Wi-Fi radio whether it be direct or via a router.
The main question: is it possible to initiate a connection/send bytes under iOS over wi-fi to a pc on the same network or via wifi direct?
Help with the method to do this or example code would be helpful.

Not able to view active servers through wifi and connect with it all the time by using Bonjour and NSNetServiceBrowserDelegate?

i am working on an App that uses wifi network to pass data from one ipad to another ipads .
i have already referred the following sample code about:
http://mobileorchard.com/tutorial-networking-and-bonjour-on-ip
The above sample code connects Devices using wifi and can exchange messages using Cfnetworking and Bonjour.
My problem is that i am not able to see Active Servers all the time .While Some times it Shows me Active servers and i can easily connect with and Exchange Messages but when i relaunch or open the app after some time it doesn't show me active servers so i am unable to connect and exchange messages. The same problem occurs in the sample code available from above link having tutorial on to Send data over wifi to another Devices.
I am Stucked up over here where i am unable to connect with active Devices all the time because not able to access those servers.
In chatty sample code same problem occurs where you can see active chat room's and connect with but some times you will not be able to see those active chat rooms availabe even if there are active servers who have already started new chat room where all Devices are connected to same wifi network.
Any help would be highly Appreciable , Thanks in advance.
Any chance the wi-fi interface on the device is going to sleep from disuse? Or that the user roamed to a different Wi-Fi access point with the same name that isn't bridged via Bonjour?
Have you considered using Multipeer Connectivity instead of using Bonjour directly? IIRC, that API would let you communicate even if the devices are not on the same Wi-Fi network, which is probably what you want anyway.

Is GSM data sending between 2 phones impossible?

Please tell me in detail why it is impossible to send the data between two phones over GSM? I can find almost no information about this problem.
There are 2 points here.
Firstly, GSM is a mobile voice telephony system - plain GSM doesn't do data connections.
GPRS and EDGE are add-ons to the GSM network that allow data to be sent.
There are other kinds of wireless phone networks that also use a SIM and allow data to be sent (UMTS, LTE).
Secondly, when you establish a data connection with a mobile phone and a phone network, you are establishing an IP connection between your phone/modem and a gateway server in the operator's network. The gateway server allows you access to the internet (together with the DNS server etc, obviously).
This is similar to a computer plugging in a LAN cable and connecting to their ISP. But you can also connect 2 computers with a crossover cable, and configure them to have an IP connection directly. So what you are asking is, why can't I do the same with 2 GSM phones? what is the equivalent of a wireless crossover cable?
The reason is because GSM has no protocol to connect phones to each other. It only defines a protocol for phones to connect to a network base station.
To transfer data between 2 phones, therefore, you need a different protocol, one which will work between 2 peers. Bluetooth is a common such protocol, but it only works over short distances.
If you want to connect 2 distant phones, you can do this via a third party, like a website, to which data can be uploaded into the cloud by the first phone and downloaded by the second phone.
Or, you could establish a connection at the IP level via the internet, e.g. if one mobile device was a web server (the last sentence is only theorising).
See also this related question
EDIT: 3GPP Release 12 includes direct Device to Device communications. At the time of writing, it's still very new, and not yet commercially available, so the answer above still holds. D2D is designed for emergency services, eg if the network is damaged by a disaster, they can still communicate directly. But 3GPP suggests that it will be commercially available as well. From 3GPP news
There are also commercial benefits of D2D, with new applications building on the physical proximity of users being trialed by operators.
2nd EDIT: Apple has created a feature called Multipeer Connectivity Framework, which uses a mixture of WiFi networks, peer-to-peer WiFi and Bluetooth to enable short distance connectivity between iPhones when there is no GSM network.
NFC is another peer-to-peer technology for communicating between 2 devices, that is supported by some phones. More information here.

Resources