Data sharing from multiple devices(both android and iOS devices) from a single iOS device

Our requirement is to share large files from multiple devices to a single device without internet. The receiver will be an iOS device, and the sender could be an Android or iOS device. The devices will be connected to the same local network.

What could be the possible solution to this?

What could be the possible solution to this?

Yes, presuming you have your app running on all devices.

There are two parts to this:

  • Service discovery. How do the devices find each other?

  • Communication. How do you share data?

On the service discovery front, I recommend that you use Bonjour for this. It’s a marketing term for various standard protocols [1] that are supported by all major platforms.

On Apple platforms, you can access Bonjour using many different APIs but we generally recommend Network framework.

On the communication front, you need to decide on an on-the-wire protocol that suites your needs. As to what that should be, it’s hard to offer a concrete recommendation without knowing more about the data you need to transfer.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Namely:

  • RFC 3927 Dynamic Configuration of IPv4 Link-Local Addresses
  • RFC 6762 Multicast DNS
  • RFC 6763 DNS-Based Service Discovery

Thank you for the reply. My requirement is to share large video files to an iPhone from various devices on the local network. If I use the Network framework, is it possible to start a socket server on the iPhone and open its port to the network?

If I use the Network framework, is it possible to start a socket server on the iPhone and open its port to the network?

Well, you won’t be starting a socket server because Network framework is not based on BSD Sockets. However, yes, you can create a TCP listener, advertise it on the local network, find it from another device on the local network, and then connect to it. For example, of how to handle the Apple side of this, see Building a custom peer-to-peer protocol.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Data sharing from multiple devices(both android and iOS devices) from a single iOS device
 
 
Q