| The Vector people who develop Matrix run a centralized server with APNS client certificates (from Apple) that allow them to push notifications to every single Matrix iOS user when they receive messages. This centralized server is a notification proxy for all iOS users that use that client. With federated systems, notifications are a big problem on iOS because the apps don't actually get to run in the background in the traditional sense. They can periodically "refresh", or they can be opened by a user, or they can be woken up by a notification. Notifications can only come from Apple, and can only come via Apple from the app's developer. Even selfhosted Mattermost pushes notifications to users via the Mattermost organization's centralized APNS notification proxy. It's an annoying form of phone-home, and I think it may even leak message content to the publisher (because the notifications can contain message data). If you self-host an XMPP server, you can't get realtime notifications of messages on iOS unless you have the app actively open and foregrounded so the app itself can maintain a connection to the server. The moment (or, actually, 15-20 seconds later) you lock your device, poof goes the connection. XMPP is not end to end encrypted, and is a dying (and weird) protocol. If you're going to selfhost anything, Matrix (via dendrite or synapse or whatever the current state of the art is) is probably the correct answer. |
You're quite right that a situation such as you describe (requiring the app to be open to receive messages) would be a horrible experience. Support for push notifications was a solved problem years ago.