Skip to content

A Vaadin project to learn how push notifications are handled on IOS!

License

Notifications You must be signed in to change notification settings

Donkaos501/NotifyMe

Repository files navigation

NotifyMe

This is a project for testing iOS PWA notifications.
I wasn’t sure how they worked when I started this project, but now I kinda have a better idea now :)


Disclaimer: The code is somewhat messy because I just wanted to learn.

Running the application

Requirements:

  • Java 21
  • Vaadin 24
  • MariaDB (for user testing)
  • NodeJS 18 or higher
  • HTTPS connection to the server running it (more on that below)

Running the app:

  1. Clone this repository, then open it in your favorite editor (mine is IntelliJ Community Edition).
  2. Go to the application.properties file and edit the MariaDB credentials and the launch port if you wish (default is 8080).
  3. Open a terminal and generate the public and private VAPID keys:
    npx web-push generate-vapid-keys
  4. Add these keys to the application.properties file.
    • If you changed the port, make sure you also update the subject property accordingly.
  5. Locate the Application class and run the main method.

HTTPS required!

To test push notifications, you must use HTTPS for the Vaadin server connection.
For some reason, Apple’s iOS PWA notifications won’t work over plain HTTP, so I recommend using ngrok (or a similar service) to provide an encrypted tunnel.

Deploying to Production

This project is not meant for production—it’s purely for testing!
However, if you still want to package it for production for any reason, you can run:

./mvnw clean package -Pproduction

About

A Vaadin project to learn how push notifications are handled on IOS!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published