Mobile Build Service :: Adding variables and parameters to the config.xml.

0 favourites
  • 13 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • NepeoAshley

    Hi. I would like to ask if it's a hard suggestion to ask for adding variables and parameters to the config.xml through the SDK or the C3 Mobile Build Service prior the final build upload.

    I've been trying to extend Construct 3's mobile features using Cordova plugins but most plugins available on the net require credentials to be inputted through the configurations. And adjusting the Cordova plugin away from the common norm seems impractical, in most cases.

    Can you advice us. Thank you very much.

  • It's already supported, although it's probably not made it as far as the documentation. You can bind a construct plugin property to a cordova dependency variable. When the user exports the property value is automatically added to the config.xml as the variable. Let me go check out what we say in the docs.

  • it looks like we haven't exposed all the required parts to the public API interface, I will look at getting it added soon for you.

  • Nepeo It's great to know you guys are prompt at implementing useful features. Thanks a lot.

  • Hi Nepeo. I'm not rushing or anything, this can wait and I saw that there are other Mobile Build concerns in need of more attention. Just wanted to know if this is all well and everyone there agreed for this to be released publicly to the SDK.

    Thanks.

  • we haven't discussed it internally, we already use it with built in plugins and there's no additional security concerns. All we needed was an interface added to the public SDK, which I've now written. The interface may need some additional work after Ash has reviewed it, but there's a good chance it will make it into the next beta release.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's great to know. Thanks a lot Nepeo.

  • Thanks for the update Nepeo.

  • no worries, let me know if you find any issues and I'll try and get them resolved ASAP. We're pushing towards a stable release so it would be good to ensure this is ready before then.

  • Hi Nepeo, sorry for just testing it now. Because I wasn't able to use Construct 3 for a while. I was checking the SDK, but I can't find the reference to adding Cordova Variables. Thanks.

  • no worries. I don't believe the examples or documentation have been updated yet.

    It works by passing a SDK.PluginProperty instance with a variable name when you create a CordovaPluginReference. Like so:

    const property = new SDK.PluginProperty("integer", "test-property", 0);
    
    this._info.SetProperties([
    	property
    ]);
    
    this._info.AddCordovaPluginReference({
    	id: "cordova-plugin-inappbrowser",
    	plugin: this,
    	variables: [
    		["MY_VAR", property]
    	]
    });
    
  • Thank you very much!

  • I updated the documentation for it yesterday as well

    https://www.construct.net/en/make-games/manuals/addon-sdk/reference/specifying-dependencies

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