4 ms·
iOS applications aren't allowed to stay awake constantly talking to a bunch of different network services. For iOS IM to work, a centralized server (and corres
by sneak 6y ago
iOS applications aren't allowed to stay awake constantly talking to a bunch of different network services.
For iOS IM to work, a centralized server (and corresponding developer ID) has to send a notification to you, sent first to Apple to be proxied via Apple's push notification service (APNS) to which each iOS device maintains a persistent connection.
This means that some third party service has to know when you get a message (and thus needs to proxy your connections to the IM services, and know your credentials and see your message contents) to be able to know when to send that notification.
This (and Signal now replacing the cryptographically shattered iMessage) is probably the main reason I'm switching to Android; truly decentralized/private notifications aren't really possible on iOS. They have to come from the app developer's own 24/7 online servers, sent from them to you via Apple servers, which means that federated stuff is basically out without providing your login details to the developer (which of course lets them see all your messages). This is also why almost no ActivityPub/fediverse clients can notify you of DMs on iOS either if you run your own instance.
I know there's Background App Refresh now that lets apps wake up periodically to download stuff; I'm not sure if such polling can fire off notifications from the local app. It's probably too much latency for IM, however, due to the fact that Background App Refresh isn't (last I looked) allowed to run continuously (for battery reasons).
- novok 6y agoYou can create local notifications any time your app is active, which includes the background. AFAIK signal does empty APNS push to wake and then pulls data with it's own connection and then displays text content with a local notification. The main reason for the restriction to apple-only for notification services is battery life, and they've been proven right by bad behavior demonstrated on android. Interestingly, if your a VOIP app you can actually circumvent a lot of the background networking restrictions, but it's still hard to do when you don't have an active call in place. You also have to be an actual VOIP app to get approved with that entitlement. Which wouldn't be hard to get approval for if you made a fork of signal for example, since it does have real VOIP capabilities inside. Either way the battery life of your device would be worse with your custom VOIP app always keeping a connection open vs. apple's native OS notification system.
- lxgr 6y ago> Interestingly, if your a VOIP app you can actually circumvent a lot of the background networking restrictions These APIs were removed a while ago. As an example, pure SIP clients (without a SIP<->APNs proxy operated by the app developer) are no longer possible for iOS.
- lxgr 6y ago> This (and Signal now replacing the cryptographically shattered iMessage) is probably the main reason I'm switching to Android Android seems to be headed the opposite direction from Apple when it comes to background service execution and network connectivity. I wouldn't be surprised if background network connections are the next thing to go. > which means that federated stuff is basically out without providing your login details to the developer It's definitely possible to support federated push, although it's admittedly more work for app/protocol developers: The app developer would have to set up a "push proxy" server that accepts push notifications addressed to a specific iOS device. It would be nice if Apple was to allow optional sourcing of "anonymous" pushes for such use cases, but that doesn't seem to be in line with their desired level of control.
- richardwhiuk 6y agoAndroid is heading in the same direction with GCM.
- lxgr 6y agoExactly, maybe I was unclear: Apple has been adding more and more background execution modes to iOS over the years, while Google has been steadily removing them from Android (and nudging developers towards GCM instead).
- wruza 6y agoYou don’t have to put an entire message text into APNS notification. Apple (and google GCM, and webpush) notifications only deliver a structured event to the application (which may or may not contain any text), and once the app is activated (if not yet), it has to connect to its own server to get a full representation of what was sent, update vv-status, etc. APNS/GCM are not instant messengers on their own, though may be used as such in simple cases. the main reason I'm switching to Android You may be interested in reading this comment then: https://www.reddit.com/r/signal/comments/ap9lin/comment/eg7v8gc?utm_source=amp&utm_medium=&utm_content=comment_expand https://www.reddit.com/r/signal/comments/ap9lin/comment/eg7v... Likely, iOS version of Signal uses the same “empty ping” technique, so you don’t have to worry about Apple reading your texts, unless you’re concerned with metadata leak. But unless they’re spoofing a websocket with fake packets, it will leak anyway.
- sneak 6y agoSure, but there still needs to be a server somewhere that has the app developer's client certificate, connected to Apple, that knows when you get a DM and can send that zero-content "wake up and check your DMs" packet to your phone via APNS, which means it needs (given current apps permissions models) access to your DMs without you.
- _-___________-_ 6y agoIt doesn't need access to the content of the messages.
- sneak 6y agoSure, but it needs to know that there are new messages. I don't think that's a separate permission on any (e.g.) ActivityPub/XMPP/IRC server implementation today.
- _-___________-_ 6y agoOn all XMPP server implementations I've worked with, the push notifications mechanism supports (and usually defaults to) not including any message body in the API call to the push server. Usually it's also possible to leave out the sender name/JID, e.g. with prosody's mod_cloud_notify.
- 0xffff2 6y ago>cryptographically shattered iMessage Could you expand on this? I did a quick search but I don't see anything relevant that's more recent than 2016.