Exporting the capx
It is necessary to export it using the cordova exporter provided by Construct2. The old exporter is only suitable for the previous cloud compiler.
Important: Please, if possible, do not minify your script.
Creating and configuring a Cocoon project
Once the exportation is finished, there would be a folder containing all the assets of your game, including the config.xml file. However, this is not how a cordova project looks like. It is necessary to make some little changes before it is possible to upload it to the cloud compiler.
Creating the project
Without a config.xml file [RECOMMENDED]
It is possible to create a project at the cloud including only the source code of the exportation without the config.xml file. In that case, a generic config.xml will be created. In any case, it will be possible to edit this file directly at the cloud compiler.
Important: If you want to use Canvas+, remember to remove the whitelist plugin installed by default in the config.xml. It is not required in Canvas+ and it can cause crashes unnecessarily.
Using an existing config.xml file
If you want to keep the config.xml provided by Construct2, it is necessary to edit it to add this sample of code:
It must be added inside the widget tag. It should look like this:
<widget xmlns="http://www.w3.org/ns/widgets"; xmlns:cocoon="http://cocoon.io/ns/1.0"; xmlns:gap="http://phonegap.com/ns/1.0"; id="com.myproject.id" version="1.0.0">
From now on, you can add plugins and select the webview engine in which to run your project as any other Cocoon project.
Important: In the config.xml generated by Construct2, there are some plugins that are not supported by the latest Cordova versions, and our cloud uses them. Do not use them unless you know you need them.
It is possible to add Cordova plugins even if the chosen webview engine is Canvas+. Take into account the special features this webview engine requires in order to use it at its maximum potential.
The old Construct2 plugins are no longer available in this cloud. Instead of them, we are working on something new and different: the Atomic Plugins.
Atomic plugins for Construct2
Atomic plugins for Cordova are available for Construct2 too. These plugins work in Canvas+. Actually, they are available for Construct 2 the following ones:
Ads: Mopub and Admob.
In-app purchases: Google Play, Amazon App Store, Apple App Store.
Social integration: Google Play Games and Game Center. Facebook coming soon.
Cocoon Canvas+: Canvas+ special features.
More coming soon.