Develop your project as a web application and then simply use steal-cordova to create Android and iOS Cordova apps.
npm install steal-cordova --save-dev
If you are developing for android you also need to install the Android SDK and Ant. You have a lot of options on how to do this. If using OSX the easiest way is with Homebrew:
brew install android-sdk ant
After installing set the
ANDROID_HOME environmental variable:
To make this permanent set it in your .bashrc or .zshrc or whatever shell you use.
steal-cordova needs a BuildResult object which you get from running StealTools multi-build:
var stealTools = ;var cordovaOptions =buildDir: "./build/cordova"id: "com.hello.world"name: "HelloWorld"platforms: "ios" "android"index: __dirname + "/index.html";var stealCordova = cordovaOptions;var buildPromise = stealTools;buildPromise;
Pass in your Cordova options to steal-cordova to create a stealCordova object that can be used to run builds, start emulators and run on Android devices.
var stealCordova = cordovaOptions;
stealCordova.build(buildResult) -> Promise
stealCordova.android.emulate() -> Promise
Call to start an Android emulator with your project. Returns a promise that will resolve when the application has booted.
stealCordova.android.run() -> Promise
Run your application on an Android device. Device must be connected prior to running this command.
stealCordova.ios.emulate() -> Promise
Call to start an iOS emulator running your application. Promise will resolve after the application has booted.
Supports same options as node-webkit-builder, but at minimum needs: