Communication between iPhone and android device

We want to connect an iPhone to an android device using a local network and also communicate?

I have already used MultipeerConnectivity framework but it is only working on iOS devices.

This is the repository I have used in my project. [https://github.com/btroller/Multipeer-Voice-Chat)

but unable to achieve my target(to connect and communicate with iOS and android device)

I have also tried NWConnection, NWListener it is only discovering the android device on the same service type but not connecting and communicating with it.

We want to connect an iPhone to an Android device using a local network and also communicate?

What do you mean by “local network” here? Specifically, are you assuming that both the iOS and Android devices are associated to the same infrastructure Wi-Fi?

Share and Enjoy

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

yes, both devices are connected with the same network

OK.

Do you have any constraints when it comes to the on-the-wire protocol? For example, do you have to use HTTP? Or are you able to choose any protocol you like?

How does your security work? Specifically, what’s your plan for authenticating the remote peer and then authorising access?

Share and Enjoy

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

We just don't want to make it secure as we are using UDP.

I’m sorry, I don’t understand this on two axes:

  • Security isn’t an option these days. That’s especially true in your case because it seems like you’re planning to do some sort of voice chat app.

  • UDP does not prevent security. Modern networking stacks, like Network framework, support DTLS.

We have the option to use both protocols

Cool.

We basically want to broadcast our device, so all other devices can discover us.

You should use Bonjour for that. Rolling your own service discovery protocol is hard because it involves a tricky tradeoff between reliability and network impact.

Once you’ve discovered your local peers it’s probably best to use UDP unicast for your data transport. Unless you have a huge number of peers you’ll find that unicast is actually faster than multicast. See my Wi-Fi Fundamentals for an explanation as to why.

Share and Enjoy

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

Communication between iPhone and android device
 
 
Q