Remix.run Logo
wahern 5 days ago

> Moving to XMPP - using prosody - worked really well for messaging, but the lack of real-time notifications on Sandra’s iPhone was sub-optimal

Were they using Monal on the iPhone? I use XMPP (Prosody) with some friends. Conversations.im works really well on Android, including push notifications. But the one iPhone user, using Monal, has said notifications don't work, and I don't know how to debug. The Monal website and commit log suggests they should be working. (macOS desktop Monal works fine for me, but it's using a normal live TCP stream to receive notifications, not cell network push notifications.)

AceJohnny2 5 days ago | parent | next [-]

AIUI (but actual iOS developers can correct me), for Push Notifications to work on iPhones requires the system to route through the Apple-hosted Apple Push Notification (APN)

https://developer.apple.com/notifications/

This is fairly at odds with the goal of XMPP, where the device listens to the server. But of course that model doesn't really work when the device is sleeping most of the time (and I don't know how IP or TCP connections are handled in an LTE or 5G world, but I'm sure there's a consideration there).

All this to say: iOS is hostile to XMPP.

MattJ100 4 days ago | parent | next [-]

You're not wrong at all, but despite it all, XMPP has actually supported push notifications for years.

For various reasons it wasn't included "out of the box" in Prosody for a while and was maintained as a community plugin, but that's no longer the case with 13.0.x+ where it's bundled with Prosody and just works.

Monal is probably the most popular XMPP iOS app today.

AceJohnny2 4 days ago | parent [-]

Thanks Matt! (prodigy creator of Prosody)

jauntywundrkind 5 days ago | parent | prev | next [-]

Apple's implementation of Web Push Protocol is also viciously inconsistent. Battery efficient yes but notifications just go missing or show up days after they were sent. Apple really has a way with keeping their own special native apps and their own services locked in.

sssilver 5 days ago | parent | prev [-]

Another way to say it would be: XMPP is hostile to power efficiency.

vetrom 5 days ago | parent | next [-]

It's not that XMPP is hostile to power efficiency, its that Apple (and Google) gateway power-efficient edge triggering behind vendor-restricted cryptographic feature locks.

They have arguably correct reasons for doing this, but it's a false comparison to say that the software is inefficient when its just as efficient that anything else at that privilege level on the phone can do.

zaik 5 days ago | parent | prev | next [-]

Conversations is one of the most battery efficient IM clients out there despite maintaining it's own TCP connection. This is possible because Conversations can tell the server to shut up unless it's important, which reduces radio usage a lot. This extension (CSI) is quite mature and found on most servers by now.

gsich 5 days ago | parent | prev | next [-]

Wrong. Apple (or Google) also use the same TCP based approach to maintain connectivity to allow notifications. No way is an extra connection responsible for bad power efficiency, with that small payloads. This is propaganda.

msgodel 5 days ago | parent | prev [-]

Nope. You can do push with XMPP just like everything else. The problem is that Apple demands open source client maintainers also personally maintain infrastructure with high availability to handle the push notifications rather than allowing them to delegate that to service operators where it belongs.

Apple is aggressively hostile to open source is the problem. IMO their behavior is why we don't have any nice open source chat apps like we did before the iPhone became popular.

tharant 5 days ago | parent [-]

I can find no such requirement in the App Store Guidelines. Or is there anecdotal evidence somewhere?

msgodel 5 days ago | parent [-]

They require push notifications to be signed with your certificate. You must maintain the infrastructure to do this yourself because you can't share the certificate with third parties (obviously) and downtime will mean no push notification delivery.

I have no idea if that's in the guidelines but that's how it works.

WhyNotHugo 5 days ago | parent | prev [-]

Somewhat fuzzy on the details right now, but:

You need to enable a plugin in prosody for notifications to get routed via Apple’s servers. The plugin is disabled by default, but included in the default installation.