4 ms·
If your app needs to send a notification while it's not currently a running process, it must go through Firebase on Google's side and APNS on Apple's side. Ther
by satvikpendem 7mo ago
If your app needs to send a notification while it's not currently a running process, it must go through Firebase on Google's side and APNS on Apple's side. There is no way for a non running app to send a notification entirely locally, this is by design of both companies.
- vlovich123 7mo ago> this is by design of both companies. I’ll note that whatever other reasons it’s also the only way to make this battery efficient. Having a bunch of different TCP connections signaling events at random times is not what you want. Ideally the app also is responsible for rendering rather than having to disclose the message but that can be challenging to accomplish for all sorts of reasons).
- 9dev 7mo ago> […] this is by design of both companies. This is more of a fundamental technical limitation of operating systems and networks; I don't think it is possible to design distributed communication between arbitrary service provider infrastructure and end-user devices without an always-online intermediary reachable from anywhere (a bouncer, in IRC terms) that accepts messages for non-present consumers.
- satvikpendem 7mo agoYes, however the fact that it is not customizable is what is annoying, you are forced to rely only on the OS makers' implementations, which I guess should be expected in the day and age.
- fn-mote 7mo agoIt sounds like you’re hinting at being unhappy with the lock-in forced by the ecosystem. The flip side of the coin: any possibly avenue to exfiltrate data and do (advertising) tracking by app developers will be used. The restrictions also protect my privacy. And my phone battery.
- satvikpendem 7mo agoClearly they don't protect your privacy as evidenced by the post we're commenting on.
- OptionOfT 7mo agoBut there is a way to do this encrypted, so that when the notification is received on your iPhone, the process itself needs to decrypt it. Except you need an entitlement for that, because it requires that your app has the ability to receive a notification without actually showing it (Apple checks this). Your app gets woken up, decrypts the message, and then shows a local notification.
- greysonp 7mo agoSignal developer here. Not entirely sure what you're saying. I'm only an Android guy, but FCM messages are certainly one trigger that can allow an app process to run, but it's not the only trigger. You can schedule system alarms, jobs, etc. And the notification does not need to be provided by the FCM message. In our case, the server just sends empty FCM messages to wake up the app, we fetch the messages ourselves from the server, decrypt them, and build the notification ourselves. No data, encrypted or otherwise, is ever put into the FCM payloads.
- satvikpendem 7mo agoSure but it needs to go through Firebase regardless of the content of the notification message, I do not believe there is a way to use a third party notification service which does not depend on Firebase.
- gertop 7mo agoAny application can send notifications without going through a server.
- satvikpendem 7mo agoHow? I'm not talking about an application backend server but a notification server which Google and Apple have for all apps. I'm not sure besides polling or having a persistent connection to send notifications to an app while that app is not running.
- eptcyka 7mo agoWhen running Signal without google play services, Signal reliably received push notifications and with minimal battery drain.
- satvikpendem 7mo agoDo you have microG? That provides a compatibility layer for FCM.