I have developed an IOS app in swift. Currently messages from app-to-app is done via sending to middle app server using REST APIs, and then the other device polls for the message. I'm wondering how to avoid the middle-man and sending messages directly to another device using the same app. I've seen plenty of text/messaging tutorials in swift and they all use the sms interface where they pop open the device native text messaging app to send (which would then be received by the native messaging app, not my app). That isn't exactly what I'm looking for. I want the app itself to send the message directly to the same app on another device. I was thinking that tokens were possibly the way to go (like push notifications), but I'm not certain that's the right way either. Is this where firebase comes in? Just looking for the right keywords to find the right tutorial, different than the ones I've already found that are not quite doing the job.
Thanks in advance for the direction.