The build configuration is used to set parameters of the build, as well as some base application settings that might be required for your custom instance
{
"cordova" : {
"dir" : "cordova",
"packageId" : "coza.opencollab.synthesis.mobile",
"authorName" : "John Doe",
"authorEmail" : "[email protected]",
"iconsAndroidXml" : "config/icons-android.xml",
"iconsIosXml" : "config/icons-ios.xml",
"iconsWindowsXml" : "config/icons-windows.xml",
"platforms" : {
"android" : "5.1.1",
"ios" : "4.1.0",
"windows" : "4.3.2"
},
"plugins" : [
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"https://github.com/OpenCollabZA/cordova-plugin-fileopener.git"
],
"preferences" : {
"fullscreen" : "false",
"webviewbounce" : "false",
"DisallowOverscroll" : "true",
"StatusBarOverlaysWebView" : "false",
"StatusBarBackgroundColor" : "#000000",
"StatusBarStyle" : "lightcontent",
"AndroidPersistentFileLocation" : "Compatibility",
"iosPersistentFileLocation" : "Library",
"windows-target-version" : "8.1"
},
"android" : {
"storeFile" : null,
"keyAlias" : null,
"storePassword" : null,
"keyPassword" : null
}
},
"serverBaseUrl" : "http://synthesis.opencollab.co.za",
"serverBaseContextPath" : "/synthesis-service",
"applicationName" : "Synthesis Mobile",
"vendorName" : "OPENCOLLAB",
"vendorURL" : "http://www.opencollab.co.za",
"dataDir" : "SynthMobile",
"logLevel" : 1,
"logToConsole" : true,
"logToFile" : true,
"logFileSize" : 1000000,
"logFileCount" : 5,
"pushEnabled" : false,
"androidSenderID" : null
}
You might want to keep your custom configuration out of the project code, especially when you start adding passwords to keystores etc.
An external config file can be placed at ~/.${module-name}/build-config.json
For example if you did not change the package name the config will be located at
~/.synthesis-mobile/build-config.json
Which resolves to:
*unix /home/username/.synthesis-mobile/build-config.json
Windows C:/Users/username/.synthesis-mobile/build-config.json
All configuration options may be overridden in the external file.
The directory in which the cordova build will take place
The id which must be assigned to your application package.
The author name that must appear in the application meta data.
The author email that must appear in the application meta data.
Path to a file containing xml for Android icon configuration
Path to a file containing xml for iOS icon configuration
Path to a file containing xml for Windows icon configuration
The versions of the platforms to use. Supported platforms are android
, ios
and windows
(still in development)
The plugins and the versions of them to install for the application.
Preferences to set to the cordova project.
Path to the keystore to use for building the Android application
Alias of the key to use for building the Android application
Keystore password to use for building the Android application
Key password to use for building the Android application
Base URL of the server. Do NOT include any context path or trailing slash.
example: http://my.server.com or http://my.server.com:8080
Context path the of the Synthesis Server. This path should contain a trailing slash. if the service is hosted on the root of the server, enter only the "/" as the value
Name of the application to display within the application
Name of the company that is responsible for creating the instance of the application (currently not used)
Webpage link to the vendor website (not currently used)
Name of the directory where synthesis will save content. This will be relative to the directory which the native device selects as a suitable location for content. It might be on a external SD card, Internal SD card, or any location the system chooses.
WARNING: Never change this once in production! Students will not see the content they already downloaded, and content not uploaded yet will seem lost!
Logging level for the application
Meaning | Level |
---|---|
DEBUG | 1 |
INFO | 2 |
WARN | 3 |
ERROR | 4 |
NONE | 5 |
You might want to build the application with an keystore, especially when you are going to deploy to the app store.
To change the keystore, which by default is a keystore generated by your SDK, and cannot be used to publish to a store, you need to configure 4 properties, cordova.android.storeFile
, cordova.android.keyAlias
, cordova.android.storePassword
and cordova.android.keyPassword
. See the description of each field to see their purpose.