Self-hosted web push Cloudflare Worker, works on iOS

(kukuroo.cc)

51 points | by saiday 5 hours ago

7 comments

  • saiday 5 hours ago
    Sending push notifications to iOS without relying on a native app has already become a mature option. Last year Apple extended the standard Web Push with Declarative Web Push, which finally makes the whole thing make sense. (It's handled natively by WebKit rather than driven by JavaScript, which improves push reliability and privacy, much like the native push notification model.)

    Kukuroo uses Cloudflare Workers so that end devices can subscribe to push notifications and relay push requests to the Worker, which signs and delivers them. I personally found it genuinely useful and full of potential, so I open sourced it: kukuroo.cc

    Requirements:

    Safari on iOS and macOS only (though seriously, who receives push notifications on macOS?) The web page that receives the notifications has to be added to the Home Screen A Cloudflare account. Push notifications and lightweight serverless functions are a perfect match

    • spiderfarmer 4 hours ago
      The might have fixed some issues but the fact that it is only available for homescreen websites and that the link to add them there is buried in the UI is very stupid imho.
      • QuantumNomad_ 1 hour ago
        > the fact that it is only available for homescreen websites and that the link to add them there is buried in the UI is very stupid imho

        Quite the opposite. They know exactly what they are doing.

        Don’t forget that originally Apple was going to make all apps on iOS be web apps. Then they came up with having native apps and the App Store and taking a 20% cut of app sales and IAP. Which made them a boatload of money.

        It is only very reluctantly that they allow us to add websites to home screen.

        Meanwhile, allowing only websites on home screen to push notifications rather than any random site actually does make sense. I’d probably get rid of my iPhone on the spot if every shit site I visit suddenly started pushing notifications to my phone. And if the sites could, the sites would. Just like websites abuse every other mechanism available to wring as many views and ad impressions as they can out of their visitors.

      • CharlesW 2 hours ago
        > …the link to add them there is buried in the UI…

        It's a standard "Send To" option (the "buried" option you refer to?), but PWAs can also use SFAddToHomeScreenActivityItem.

      • saiday 3 hours ago
        agree ++
      • justatechguy 1 hour ago
        [flagged]
  • mrklol 2 hours ago
    My biggest problem with web push is that you won’t get notifications on iOS anymore, if you haven’t opened the app for a while. A tad bad for some apps.
  • skybrian 3 hours ago
    It sounds like adding a Safari web app to your home screen is a slightly janky delivery mechanism?

    Could you use Safari for delivering the notifications even if your default browser is something else?

  • andrethegiant 1 hour ago
    How is it self-hosted if it runs in a cloudflare worker?
    • kentonv 1 hour ago
      It means you can deploy it in your own Cloudflare account, as opposed to it being a service provided by the developer.

      But also, the Cloudflare Workers Runtime is open source, so you could deploy it or your own machines, too, if you want:

      https://github.com/cloudflare/workerd

  • noman-land 3 hours ago
    Are there any solutions to encrypting notifications so that the service provider cannot see them?
    • saiday 3 hours ago
      Declarative Web Push messages are end-to-end encrypted natively, even Apple cannot see the content.
  • zuzululu 3 hours ago
    I use FCNS or APNS to send notifications to mobile apps, its a bit of hassle but it reaches all platforms.

    It'd be great if this solution reaches all browsers on all OS but I can see the potential for spamming , might be why Apple and Android require photo id now.

  • oulipo 4 hours ago
    Seems nice! I use FCM (Firebase) which does this for Android and iOS, which does require some setup, but it's not too bad