There are two kind of push notification:
- iOS/Android push notifications => Off topic
- Web Push => Unsupported by expo (and no status on it’s futur in expo)
it seems that Expo Team have removed the Web Push support (I checked on GitHub). I don’t understand why at any point since there are many working examples on the web. This issue is just an example of an old command removed in later expo version.
- Learn: The Web Push Protocol - Base Site
- Demo: Simple Push Demo
- java: GitHub - web-push-libs/webpush-java: Web Push library for Java
- node: web-push - npm
etc…
I am now trying to implement it on my end but the expo-service-worker.js
is not served correctly when accessing the PWA at localhost
, it work fin when I use the local ip but the web push permissions fail due to unsecure origin.
- Why did expo removed the web push when it’s clearly possible to support both web push and notification as they have the same capability (registration/unregistration/notification when the app is not running)?
- How can I fix the
expo-service-worker.js
(Related issue: Expo: How to fix web push notification in development when accessing throw localhost (and how to fix the `localhost` service worker)?) - Will expo re-add web push support in the futur?