On this page we have collected information about using the Apache Cordova build system with Evothings Studio. This enables you to build native mobile applications for the Internet of Things (IoT).
You can use Evothings Studio without Cordova, but if you want to create native apps it is what you want to use.
To build apps with Cordova you need to install Cordova itself and also the mobile SDKs (Software Development Kits) for the mobile platforms you wish to deploy your app on. The main platforms used by Evothings are iOS and Android.
Installing Cordova and the SDKs can be a bit time consuming and requires that you can use command line tools. Once installed Cordova is easy to use, so don’t give up.
To help you in installing and using Cordova the Evothings documentation contains a Cordova Build Guide.
The highlights of this guide are:
To summarize, you need to install Cordova on your desktop/laptop machine, and you also need to install the mobile SDKs for the platforms you wish to build apps for. On OS X you can build apps for both iOS and Android. On Windows and Linux you can build apps for Android, but not for iOS (there is no iOS SDK for Windows/Linux).
If you are new to Evothings Studio, read the Introduction in the documentation to get a basic understanding of the development tools used.
It can be useful to know that Evothings Viewer is itself an app built with Cordova.
Evothings Viewer has a number of plugins included, see the plugin listing in the documentation.
When you build your own Cordova app, you should keep track of which plugins are used by your app so you can add them to the Cordova project (if you are not sure, just ask on the Evothings Forum).
To build Evothings Viewer is easy. Just get the get the source code and follow the instructions given in the GitHub repositort.
The two main tools in Evothings Studio are Evothings Workbench and Evothings Viewer. The Workbench provides the live reload workflow used with Evothings Viewer. You can also use Evothings Workbench and live reload with any Cordova application.
When developing an app with Evothings Studio, you have two options:
These are the steps to create a Cordova project from an Evothings app, for example one of the example apps that comes with the Evothings Studio download:
Read on in the Cordova Guide to learn the details and see actual command tool examples.
There are two options:
Develop the app using Evothings Viewer. This works great given that your app does not depend on any additional plugins besides the ones that are included with Evothings Viewer. Just drag index.html into the Workbench and click RUN. When you are ready to test/ship the app, you build it like any Cordova app.
Build a custom version of Evothings Viewer. This is the solution when your app needs a custom set of plugin. Get the source code for Evothings Viewer on GitHub and and follow the instructions given in the repository. Update the file package.json with the plugins you wish to use (you can also remove plugins you don't want to have). Then build and install your custom Viewer and connect to the Workbench. Drag index.html of the Cordova app you are developing into the Workbench, click RUN, and you are up and running. (Yes, it is fully possible to run Evothings Viewer inside Evothings Viewer, that is how we develop the Viewer app!)
Here is an overview of the Cordova directory structure.