I need to have the user be notified when an event is triggered on a server (a message is sent to them). I have tried using background fetch, but it does not run frequently enough. Using a socket.io websocket disconnects when the app is put in background.
How would you get a message notification instantly while in the background, like discord or any other IM app, when sent?
I am coding in XCode with Swift and Storyboards.
Please don't ask for code snippets, if you really want I can give you the socketio code i'm using, but it would just be irrelevant to this question.
Thanks for your help in advance.