We have an Angular 6 / Firebase 5.4.2 / AngularFire PWA that is heavily using Firebase for auth, and FCM for notifications that we are attempting to bundle into an application suitable for listing in app stores.
The PWA is functioning well, and is receiving FCM notifications via the firebase-messaging-SW.js service worker.
We've attempted using both Cordova, and Capacitor to bundle this PWA into an APK and IPA. We've struggled to get notifications working, however. Debugging the issues have shown us that although the service workers register, as we request permissions, we get the errors:
ERROR FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser).
referenceError:Notification is not defined. firebase messaging request permission
Any guidance on this would be much appreciated: if you know of code samples that show packaging a PWA while using FCM notifications that we can work from, that would be ideal, or if you know of approaches that have proven successful for other teams, then a point towards those toolsets would also be of use!