Ionic Pro: FCM on iOS

I am using IonicPro and FCM. On Android I am getting notifications and everything works fine. On iOS the app crashes on start after showing the splash screen. The app works on testFlight and it also works when I comment out FCM. I have isolated the problem to FCM and also made sure its not anything to do with my certificates.

Any help from anyone who has been able to get this to work will be highly appreciated.

If you don’t hear from others, I can give you a somewhat educated opinion. Make sure you have a GoogleService-Info.plist in the root folder of your app (on the same level as src, www, etc…)

And you MAY have to write a firebase-messaging-sw.js file and put it somewhere (don’t remember where exactly, I think at same level as your service worker file).

Search those things if you haven’t already done them and it might lead to an answer. My solution has been to stop trying to use FCM and use Onesignal, so I might be off here. But, better than nothing I suppose.

Thanks for your response. are you able to get OneSignal work with IonicPro ? It gives me a cocopods error and fails to compile.

same thing here. I don’t have a Mac, so have to build my app on Ionic View without Onesignal.

Did OneSginal work for you on iOS. My app is crashing on startup for OneSignal too.

It does. I use an Apple Developer Ad-Hoc certificate to sign my app with, and upload an Apple push certificate in onesignal. If it’s crashing on start-up, do you have Apple certificates? Do they match the info in your project? If not, bad things happen. It’s a bit of a pain.

could you resolve the problem meanwhile?