I'm currently developing a PWA that uses Web Push Notifications and app icon badges. All badge functionality works as expected while the app is open, backgrounded, or even when the phone is locked.
However, one issue remains:
When the user force-quits the PWA (by swiping up in the app switcher), the push notification still arrives, but the badge does not update. Once the user re-opens the PWA, badge functionality resumes normally.
Here’s what I’ve got so far:
I'm using a service-worker.js to handle push and badge logic via self.addEventListener('push').
navigator.setAppBadge() and self.registration.showNotification() are used properly.
Badge count updates correctly unless the app has been force-closed.
I’m not using native wrappers (e.g., Capacitor), just a standalone
installed PWA.
As of 2025, is there any known update or workaround that allows a PWA installed on iOS to update the app icon badge after the user force-quits the app?