[Request] Specifying resource files for Cordova projects

0 favourites
  • 4 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • Hi Ashley,

    Good day!

    Would it be alright to request to have an option to add resource files (<resource-file src="" target src="" />) in Cordova exports? Whether through the Addon SDK with plugins, or directly through an option for Cordova exports.

    Or, at least for the mobile exports to recognize the google services files.

    This is to be able to use Cordova plugins for Firebase that are publicly available in npmjs without having to fork them, because currently we have to add hooks scripts to be able to insert google services files.

    Sample resource config:

    <platform name="android">
     ...
     <resource-file src="google-services.json" target="app/google-services.json" />
    </platform>
    ...
    <platform name="ios">
     ...
     <resource-file src="GoogleService-Info.plist" />
    </platform>
    

    For reference: github.com/Scirra/Construct-3-bugs/issues/5538

    Hoping for your kind consideration.

    Thank you.

    Tagged:

  • If those are the only two files you need, can't you just make a tiny cordova plugin that adds those tags? It seems like there shouldn't be any need to fork an entire plugin if all you need to do is add a small change to config.xml - you could use the original plugins on npm and include your own tiny plugin to add those tags, and such a tiny plugin would be trivial to review and update on the build service.

    Also I'm not really clear why this is specifically needed for C3 - don't the original plugins already add those tags? Why is this different in C3?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If those are the only two files you need, can't you just make a tiny cordova plugin that adds those tags?

    Woah, you're absolutely right! I just realized that now.

    Thank you!

  • Also I'm not really clear why this is specifically needed for C3 - don't the original plugins already add those tags? Why is this different in C3?

    Regarding this question, the tag I mentioned is only for the config.xml of the Cordova Project itself, which Construct 3 generates automatically in the Construct 3 Build Service.

    However, for the new Firebase Cordova plugins, the authors expected the users to add those tags when they write their Cordova Projects prior to cordova prepare. Therefore, for us to add those tags in a Construct 3 project, we would have to manually edit the config.xml every time. Hence, the reason for forking the Cordova plugins to append the hooks script.

    In any case, your recommendation works fine as well, I'll just make a tiny Cordova plugin that implements the hooks script, independently.

    Thank you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)