Feb 10, 2025 | 🔗 | Discuss on Lemmy
Server pushed notifications to a PWA (works on iOS!)
I love the idea of PWAs (progressive web apps, MDN): develop & debug like a website, no app store, works (...mostly) everywhere. Of course, there are some limitations, and each platform works slightly differently, but it still seems like a nice way to create simple apps that don't use too many APIs (or prototype them, at least). I spent a day figuring out how to get a PWA working in iOS, create notifications, and to trigger notifications from the server.
Code, and instructions to run it yourself: web_push_rust_example
I used a few dependencies / resources:
- Axum, a Rust server framework
- web-push, a Rust library that communicates with browser's push servers
- The web.dev Notifications documentation, which explains how everything works