WalletConnect / a2

An Asynchronous Apple Push Notification (apns2) Client for Rust
MIT License
136 stars 47 forks source link

feat: add implementation to support safari web push #57

Closed hortopan closed 2 years ago

hortopan commented 2 years ago

https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html

{
 "aps": {
    "alert": {
        "title": "Flight A998 Now Boarding",
        "body": "Boarding has begun for Flight A998.",
        "action": "View"
    },
 "url-args": ["arg1", "arg2"]
 }
}
pimeys commented 2 years ago

Cool. Is this something that also could be done with https://github.com/pimeys/rust-web-push

I will merge this if you feel it's important to have here, but I have no means to test any of the code...

hortopan commented 2 years ago

Cool. Is this something that also could be done with https://github.com/pimeys/rust-web-push

Safari's web push is not based on web push protocol (with web workers, etc) so it doesn't work with regular web pushes as everything needs to go through Apple's apns.

I think this could potentially be implemented as a dependency within pimeys/rust-web-push so that we have support across the board.