Open casper5822 opened 7 years ago
I have the same issue. Trying to compile on Ionic Cloud and get this same error:
Error: cordova-plugin-fcm: You have installed platform ios but file 'GoogleService-Info.plist' was not found in your Cordova project root folder.
This is simple issue Create your app profile in FCM console and download the .plist file from the fcm console then put it in the root of the project folder thats it
I have the plist file in my project root folder, the problem is not in the local enviroment but on the ionic cloud. The package function that uploads the project to the ionic cloud does not copy the files inside the project folder ( it copy only the index.html and the package.json at this level) and only the www folder so the plugin at build time fail on the ionic platform
Yeah same here. I also had created the project on Firebase and copied the GoogleService-Info.plist inside the project. But it seems that this file does not get uploaded on the Ionic Cloud when we run the "ionic package build ios --profile dev" command to build on the cloud.
Actually, thinking about it, @casper5822, maybe this is an issue we should take to the Ionic Cloud team instead of here. I don't think this is a cordova-plugin-fcm issue, more a Ionic Cloud issue.
I just tried to compile on android in the Cloud and we get a similar issue :
Error: cordova-plugin-fcm: You have installed platform android but file 'google-services.json' was not found in your Cordova project root folder.
This is definitly an issue with thoses 2 files not being copied onto the Ionic Cloud !
I just created a post in the Ionic Forum : https://forum.ionicframework.com/t/fail-to-compile-on-ionic-cloud-with-cordova-plugin-fcm/83208
@casper5822, you should tell also your story in the same thread. Would help !
I think, ionic team upload few files at the root level on their cloud for security issues maybe. The solution is maybe simple, just modify the plugin hook during the search phase to look for the config file also in the www folder.
the script is this:
if (directoryExists("platforms/ios")) { var path = "GoogleService-Info.plist";
so become var paths = ["GoogleService-Info.plist","www/GoogleService-Info.plist"]
@casper5822, I'm having the same issue. Where do you add this script ?
There is a solution for this problem ? I have tried manual copy and all steps but when compiling in ionic cllud always the same error "Error: cordova-plugin-fcm: You have installed platform android but file 'google-services.json' was not found in your Cordova project root folder."
In local works perfectly
Thanks !
Yes you can use a hook of the ionic cloud...more instructions here: https://github.com/ionic-team/ionic-package-hooks
hi @jimbomilk , i checked your given link, but i am little confuse how to use ionic hook, i am trying to build ios app by ionic package build ios command, and i have added hook
I copied plist file into project root folder on ionic 3 but i got same errors Please help me my error
Hello everyone, I try to build my ionic app on Ionic Cloud Service. The Ionic package function make a copy only of the www project folder and upload it on the Ionic cloud. During the package the plugin fails the installation with this error:
**Fetching plugin "cordova-plugin-fcm" via npm Installing "cordova-plugin-fcm" for ios
Error: cordova-plugin-fcm: You have installed platform ios but file 'GoogleService-Info.plist' was not found in your Cordova project root folder.**
I think it's a problem of the built-in plugin hook, this because it looks for the file in the root folder, and not also in the www folder. Maybe i made some mistake, do you have some tips?
Best Regards.