"Offline" iOS networking

Hello! I have a question that I am not sure whether it’s hard to answer because of a certain way of thinking about the tech involved or how I’m asking the question. I will attempt to be thorough but please bare with me as my knowledge of iOS is currently outdated and novice at best.

Phones in general are useful because they connect us over global distances. What I’m curious to know more about is the capabilities of using them at close distances. Sure I can start a game of chess with a friend in another country, but what if I wanted to play a game with someone next to me on the plane where we have no internet and didn’t want to share phones? The first thought that formulates is Multipeer Connectivity. Sure, that works, however, lets change the application from chess to something a bit more complex. Bingo, between anywhere from 4 to, just to make things interesting, 32 people in a room. Each player has their own phone and card and can see which number is being called and can select to view others cards as well. Maybe the phones use some form of block chain to confirm what each other persons card should have to prevent cheating. Maybe one phone acts as a server so-to-speak. Is it reasonable to assume that one can design an app, in which all phones “network” together with out any need for a connection to internet via a wifi connection or the phones data network, basically removing the need for a server somewhere to be reached by all the devices? At the very least, if this is impossible using only the devices, could this be achieved as long as they were all on the same wifi network, regaurdless of the wifi being connected to the internet? Kind of how me and my friends used to play Age of Empires without the need for internet as long as we were on the same wifi or LAN. The only requirement I want is for people to be near each other in proximity. I DO NOT want an app that is merely “better” played when near each other but can be played at long distances if you wanted. I really want to pour my resources into this app but it is difficult to start without knowing if this seemingly basic issue is even resolvable by the average programmer or if this will take a new level of ingenuity or technology to come along. I have scoured the internet for a couple of years and even failed at trying to learn it myself a few times. I honestly do not think anybody can answer this question and prove it to be true. Most I get are theories but no real proof. I believe it’s one of those gray areas where if I were to say “Make a phone that can contact another phone with out the need for cell service as long as they were close”. One would simply answer “Why not just buy a Walkie Talkie radio instead?”. I agree, however, everybody has phones…not many have walkie talkies. Why delete the old just because the new works better when you can make the new “rollback” if it has too. Anyway, I would appreciate any definitive answers on the subject and also any proof.

Hey @ckflawless!

I’m not sure if i can give a definitive answer here but seeing as this post is in the “iOS” category, i’ll try to give you some iOS specific tips.

An iPhone has a few ways of communicating with other devices wirelessly:

  • Cellular Network
  • WiFi (inc Peer-to-Peer)
  • Bluetooth
  • NFC (not useful here)

Apple hardware is very locked down so you’ll find that you have to work with the SDKs that you have been provided with so that leaves us with a few things:

  • Core Bluetooth
  • CFNetwork (or Foundation networking APIs)
  • Multipeer Connectivity

Without creating an external local network (even if it’s not connected to the outside world) you would only be able to look at CoreBluetooth and MC.

You could probably create some sort of mesh network using bluetooth as a comms protocol if you wanted but MC is too high level for anything like that. MC does however offer peer-to-peer WiFi support though to make things a bit more reliable if you were worrying about Bluetooth connection being poor.

I’m not sure if anything i’ve said actually helps but your question is quite complex so I wanted to give it a go :stuck_out_tongue: good luck with investigations

1 Like

I appreciate any information on the topic. You’ve already have my mind pondering two things I didn’t know before reading and may also inspire someone else’s thought. Thank you very much

1 Like

This topic was automatically closed after 166 days. New replies are no longer allowed.