Fail to compile on Ionic Cloud with cordova-plugin-fcm

Hello,

I’m having troubles compiling my Ionic 2 app on Ionic Cloud for platform iOS and Android when adding the cordova-plugin-fcm plugin.

It fails with the following error on iOS :

Error: cordova-plugin-fcm: You have installed platform ios but file ‘GoogleService-Info.plist’ was not found in your Cordova project root folder.

and this one on Android :

Error: cordova-plugin-fcm: You have installed platform android but file ‘google-services.json’ was not found in your Cordova project root folder.

I have of course correctly created my project on Firebase and downloaded both GoogleService-Info.plist and google-services.json and placed them in the root of my Ionic project.

It just seems that the command “ionic package build ios --profile dev” does not copy thoses files and therefore trigger this failure to compile.

Is there a config file were I have to add thoses 2 files so they get copied onto the Ionic Cloud ?

Any idea how I can fix this ?

Thank you

Arnaud Connois

3 Likes

Hi connois,

you will have to create firebase project from https://console.firebase.google.com, if you already created then simply do

  1. create android project, download and copy google-services.json file in platforms/android for android
  2. create new ios project with the same package name as android project and from there you will get GoogleService-Info.plist and follow instructions to setup ios project.

hope this will help.

No, it won’t as he isn’t building locally but on Ionic Package, the Ionic Cloud Service, where he doesn’t have to the platform folders.

1 Like

Do you know in which folder I need to put GoogleService-Info.plst in this case?

Do you have any solution to fix this issue?

I’m having the same issue like many others. I’m wondering how people solve it. I didn’t find any workaround.

the error itself says you to put in the root folder . Put those files in the main project folder and try!

Hi all, there is any update about this. Same problem on Android.
Thanks !

I tried to solve this for weeks. I even worked with Zach from Ionic Pro support team to try and understand where the problem was, and we have never been able to fix it ! This is due to some incompatibilities on the Ionic Cloud Legacy & Pro platform !

I ended up buying a Mac Mini and do my compilation on it ! And it works perfectly with this plugin !

I guess the feature “build your app on the Cloud” that offers Ionic Cloud Legacy & Pro has limitations !

Hi connois, I was working with Zach also about this issue,
Finally We found the issue and Zach was able to reproduce, now they are working on this.

The problem is that the GoogleService-Info.plist that is present on de .ipa installer archive is different from the uploaded GoogleService-Info.plist
The original file is a XML document and the final archive is a binary file, son when the plugin initializes and try to read the file it craches.
As I said, they could reproduce this issue but I think that this will take a long time to be solved. I’ thinking to buy as you said a mini MAC to continue with the project.
Thank you a lot for your advice!
BEst regards
Roni

With no mac is impossible to resolve?

Nowadays yes. :frowning: