0

My RN mobile app works with Firebase as a Web App. Everything works fine. Now I need to add the push notifications functionality to my mobile app. I have read several articles about push notifications for RN apps:

Mainly all articles describe a specific configuration for Android.

My question is, can I use web push notifications in my mobile RN app as described here: https://firebase.google.com/docs/cloud-messaging/js/client ? Or should I register a separate application for Android and iOS in my Firebase project and add to my RN project platform-specific files (AndroidManifest.xml, google-services.json, build.gradle, etc)?

Firebase apps screenshot

Mikhail L
  • 1
  • 1

1 Answers1

0

If you use the Web SDK, push notifications will not arrive on iOS as the Safari/WebKit implementation there doesn't support the necessary APIs that Firebase Cloud Messaging depends on. See Push notifications in Apple Safari with FCM for more on this.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Frank, thank you for your answer. I meant for my mobile app, can I use the web setup and expect push notifications to come to Android and iOS? Or do I need a separate configuration for Android and iOS? – Mikhail L Jul 25 '22 at 06:53
  • I understood your question, and that's what I answered: it won't work on iOS as Safari/WebKit there doesn't support the required APIs. Configuration will not help for that. – Frank van Puffelen Jul 25 '22 at 14:46