Post

Replies

Boosts

Views

Activity

Reply to Communicate between iOS and macOS ?
We're doing an app where Android and Mac send messages between each other. So far we managed to handle Android <-> Android, iOS <-> iOS and MacOS <-> iOS. We used Bonjour (NSD in Android) for discovery. When it comes to Android <-> iOS/Mac, they discover each other fine but the connecting is problematic. On Android's end, to start we used Google's old nsdChat, converted to Kotlin and added coroutines to free up the main thread. On the Mac, we used Apple's Peer-to-Peer sample project of TicTacToe. Like I said, both apps work fine on their own OS. Doing Android<->iOS/MacOS, after we register Android's service, Bonjour on Mac recognizes it. Android discovers the Mac too and resolves the service. After connecting, Android says it connected a client socket and manages to send a message before getting a random symbol back from Mac's side although no one sends it, before closing the connection. On the other side, when you click on Android's "Connect", Mac doesnt immediately shows any signs that they connected, but when you send the message from Android it shows some errors. (so there was something between them) We're inexperienced in the Networking part, but we suspect it has something to do with the protocols, as it mentions SSL and TLS. Not sure if we have to do some extra modifications to it to work. Is it as simple as adding a SSL socket to Android and that that would fix the connection? There are practically no examples online, and literature is pretty scarce (all are mostly decidated to their own OS's, without cross functionality). I can expand more (add our code, explain further etc.) if there is someone who knows what's wrong/missing.
Mar ’22