How to add a file to the root?
-
Plugins like Cordova-firebase request you to add a plist and json file to the root of the project.
Monaca cloud does not allow to add to the root.
Is there a way around this?
Thanks
Remco
-
There are a few ways to accomplish it because there are different firebase plugins.
If you use https://github.com/fechanique/cordova-plugin-fcm then the files should be automatically created.
If you use https://github.com/arnesson/cordova-plugin-firebase then you need to manually upload the config files in the root by following this procedure.- Open your project in IDE.
- Click the upload button on the top-left of the page
There are a few ways to accomplish it because there are different firebase plugins.
If you use https://github.com/fechanique/cordova-plugin-fcm then the files should be automatically created.
If you use https://github.com/arnesson/cordova-plugin-firebase then you need to manually upload the config files in the root by following this procedure.-
Open your project in IDE.
-
Click the upload button on the top-left of the page
-
A modal will open, select the
/
as destination and upload the config files.
At this point, the config files should be available on IDE
-
Thanks! Great. I’ll try tonight.
-
I’ve not so much time now, but the files are not automatically created in the fcm plugin.
i get this:
Build Error: Error: Sandbox Exec Error: [ Error: cordova-plugin-fcm: You have installed platform android but file 'google-services.json' was not found in your Cordova project root folder.
I think the plugin automatically puts them in the right place, once they are in the root folder.
I also tried uploading a file. This might have worked since i got no error. Am i supposed to see it in the file structure? Or is it always hidden?
-
You should be able to see the files after your refresh the project tree content (there is an option close to the
upload
button.