FCM issues on iOS cordova-plugin-firebase

Hey all,

I am using cordova-plugin-firebase with my ionic 2 app. I have configured it for both iOS and Android in the Firebase console. I am using the new .p8 Application Key from Apple. I have enabled push notifications and background notifications in XCode. I have the google info plist in the project. It compiles and runs no problem but I cant send any test notifications to it in the Firebase Console. I believe Firebase itself is working as i show a single active device in the dashboards, but that might be a red herring. really need help on this thanks!

Is this app in dev phase (using it on Ionic View) or actually packaged and installed?

I just ask because I could never get FB notifications to come through in Ionic View myself.

this is first, and primarily, testing using ionic cordova run ios --device. I also tried manually copying the .ipa from the xarchive. as well as just pushing it to prod just because i was going crazy at that point trying to rule things out.

One other thing of note. At least when running ionic cordova run ios --device when i look in settings under notifications, the app doesnt show up in the list as something i can control the notifications on.

I use onesignal for my push notifications, and can’t get those to come through unless I’ve actually packaged through phonegap. Though, I’m at a disadvantage being that I don’t have a Mac and run into cocoa pods issues if I try to package with pro.

But, they also don’t register using Ionic View. so I’m sorry I can offer nothing aside from empathy

Not sure it can be helpful for you but I use phonegap-plugin-push 2.0 to push notifications, it works fine with FCM

Ya i may look at that just again to rule everything out. The only thing is again the firebase plugin itself appears to work. i can see “a” device in the dashboards and i successfully send a token upon app load to my backend. i honestly feel like i’m just missing something stupid with configuring things for iOS, but i’ve poured through the guides like a million times and cant find what im missing.

I don’t know how it works with plugin-firebase but with phonegap plugin there are 2 types of registration token: FCM and APN, on ios i have to convert apn token to FCM

So i think the plugin-firebase is based on the Firebase SDK which uses method swizzling to convert the tokens. That may be totally off, but that is the impression i got.

Ok yup it was me being an idiot. Apparently there is a method for checking/granting permissions for push notifications for iOS only. I just would have expected that to be in the documents for installing/configuring access rather than having to look at all the individual methods. Oh well. Thanks for the help!

I have the same problem with iOS and the app even crashes on iOS device on launch though it works fine from ionicview.

Any help will be highly appreciated. I am on ionic 3 and use ionicpro for build.

Do you have your googleservices-info.plist set up properly?

i have it in the root folder and also added the following to config.xml. Also, I am building from Ionic Pro

Hi durablegravy, I have exactly the same issue. can you please share how you solved this using the “grantPermission” method?

Thanks a lot

Try checking your googleservices-info.plist the one under platform>ios>YourApp>Resources and platform>ios>YourApp>Resources>Resources

If any of these is corrupt your app will crash replace these two with a newly downloaded one …hope it helps

1 Like

Hi, have you resolved? I’m the same problem too.

hey guys sorry its been so long. Moved on to a different project. Here is the applicable code in my app.component.ts

platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
this.firbase.hasPermission().then((data) => {

sorry for the late reply please see my below