This tutorial guides you through setting up your Cordova app on Nevercode. Nevercode doesn't require any kind of additional software or configuration files from your side. We’ll scan your repository and from what you have there, our builders find everything they need. You’ll just have to confirm what configuration you want to build.
The guide covers how to:
Cordova project structure
To identify an app as Cordova, Nevercode looks for a "signature" comprised of 2 components. The
config.xml file will be present by default in any project that began its life as Cordova. However, if you are converting e.g. a Phonegap project to Cordova, please be sure to address all the points below before adding your project to Nevercode.
Cordova namespace must be correctly specified in the
config.xmlfile in the root folder of your project. Here's what this looks like:
<widget id="com.your.project" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
There must be no
ionic.config.jsonfile in the root folder of you project. This won't be something you'll have to worry about unless you are converting your project from Ionic to Cordova. However, this file is the only distinguishing feature between Ionic and Cordova projects, which is why this is part of the Cordova "signature".
- Select the appropriate option for where your app repository is hosted. See Specifying app repository for details. If you choose to add the repository manually, see Defining checkout URL and Authenticating repository access for details.
After specifying app repository, Nevercode takes a first look at it by listing the
branches in this repository. The next step for you is to select the branch you want Nevercode to scan for projects.
- Select a branch from the dropdown that Nevercode should scan. Note that you can change the branch later if needed.
- Click Scan branch. Nevercode scans the repository from the specified branch. This includes cloning the repository, looking for projects from it and searching for the configurations. All these actions can be monitored real-time from your browser via the live log window.
- Once scanning the branch has finished, you need to select a project from the Project dropdown. The Project selection here means a directory in your repository where the Cordova configuration file
- Select an option in Configuration dropdown, so Nevercode will know whether to build the
releaseversion of your app.
- Select the platform for which you'd like to build your app (Android or iOS, or both platforms).
- Enable the appropriate build options by checking the corresponding boxes.
- Finally, click the Save and start build button. Nevercode will start the very first build of your app and you can monitor the real-time logs right in your browser.
Cordova applications usually depend on additional Node modules. Nevercode installs the dependencies listed in your project's
package.json file automatically with
npm install right after your repository has been cloned for building.
The very first version of your app is built without code signing. Navigate to the Code signing section in your app settings to set it up for iOS and Android.
Signing configuration in build configuration file
By setting up Git hooks, you can have Nevercode automatically build your app every time you push changes to the repository. For instructions, please refer to Building automatically (Git hooks).
Nevercode supports publishing your build artefacts to several distribution channels. See our full list of supported distribution options for more information.
Nevercode exports two environment variables that you can use in your build scripts:
NEVERCODE_BUILD_NUMBER. You can read more about it from Incrementing Cordova app version.
See also how to: