References:
Status:
Push notifications proposal by Oskar Push notifications proposal - Google Documenten
Push Notifications v2 by Pedro https://ideas.status.im/ideas/086-push-notif-v2/README
Message IDs in Push Notifications by Pedro Status.app
Push Notifications v2 design notebook https://docs.google.com/document/d/1TCeTY77fCGHqAseWkH74P0mk7PF8DGXN7xvbYqodnTI/edit#
Fixing notifications by Eric Status.app
Community:
Feature Request: Mobile Push Notifications Feature Request: Mobile Push Notifications · Issue #10363 · status-im/status-mobile · GitHub
Riot’s magical push notifications in iOS Riot’s magical push notifications in iOS
Proper Key Exchange with Push Notification Providers? Status.app
Adventures in “Decentralized” Push Notifications by Pelle Braendgaard [uPort] Adventures in “Decentralized” Push Notifications | by Pelle Braendgaard | uPort | Medium
A push notification server written in Go (Golang). GitHub - appleboy/gorush: A push notification server written in Go (Golang).
Implementation
There are two ways for PN implementation
-
local notifications
application or service is running and it triggers push notifications -
remote notifications
application isn’t running and push notifications are added by OS triggered by remote services
Currently, we have local notifications implemented on Android
BUT for ios there is no obvious solution for that
Some research from Andre iOS Refresh - CodiMD
Among the references above, we know that signal, riot and uport use remote notifications with their own centralized server and apple push server
Status first MVP version for PN used Firebase Cloud Messaging directly from the application and users exchanged their device tokens
Lets consider next options:
pros:
Status doesn’t need to run and maintain servers
FCM react native library can be used
cons:
users need to exchange tokens
both users sender and receiver must give access to this service and share their tokens
metadata leakage
relience on third party service
not possible to publish such app on f-droid
-
Status service avaliable over http with 3rd party service like Firebase Cloud Messaging, Amazon SNS, Pushy or other 3rd party providers
pros:
FCM react native library can be used only on ios
cons:
Status needs to run and maintain servers
relience on third party service
metadata leakage to status servers
difficult or not possible to run such service by users because of privacy and 3rd party service registrations
-
Status service avaliable over waku with 3rd party service like Firebase Cloud Messaging, Amazon SNS, Pushy or other 3rd party providers
pros:
FCM react native library can be used only on ios
less or no metadata leakage to status servers
cons:
Status needs to run and maintain servers
difficult or not possible to run such service by users because of privacy and 3rd party service registrations
relience on third party service
pros:
no relience on third party service
less metadata leakage to status servers
cons:
Status needs to run and maintain servers
Status needs to implement support for ios push notification in the app
pros:
no relience on third party service
no metadata leakage
can be run by users as a service
cons:
Status or users need to run and maintain servers
Status needs to implement support for ios push notification in the app
So in any case with remote notifications, user who sends message, should also send notification and it can be sent only if recipient apple device token is known
Alice and Bob have additional public keys for push notifications
PN waku node is a regular status node which has a public key
Alice sends her device token using push notification public key, so waku node doesn’t know Alice’s chat public key
PN node stores Alice’s device token and Alice’s pn public key
When Bob wants to send PN to Alice he sends Alice’s pn public key to waku pn node, Bob doesn’t know Alice’s device token
In this approach ios users must share their push notification public key if they want to receive PN from user or group chat, IMO that’s fine so notifications for every chat will be disabled by default and users can enable them for example by clicking on the bell icon, and in that case, they share their pn pubkey
PN implementation tutorial for ios Push Notifications Tutorial for iOS: Rich Push Notifications | Kodeco
So there are options how PN on ios can be implemented, and we need to discuss and find the best fit for us and implement it, please share your thoughts and ideas, thanks.