Building hybrid apps with Savvy - nth-iteration/savvy GitHub Wiki

Savvy is designed to for plug-and-play integration with Apache Cordova and Adobe PhoneGap. The [config.xml](Defining applications (config.xml)) used by Savvy projects and that used in Apache Cordova and Adobe PhoneGap projects are both extensions of the W3C's Packaged Web Apps standard. This means that built Savvy projects can be used directly as the source for Apache Cordova and Adobe PhoneGap projects.

Both Apache Cordova and Adobe PhoneGap use a Node.js-based CLI, just like Savvy.

The choice of Apache Cordova or Adobe PhoneGap will depend on a number of factors. The main difference is that Apache Cordova is an open-source and and as such may give you more flexibility. However, using Apache Cordova will require that you install the relevant software-development kits (SDKs) for the devices you are targeting on your development machine. Adobe PhoneGap is a commercial version of Apache Cordova and allows you to build "in the cloud" without local SDKs. However, you will need an Adobe ID and there will be restrictions on the number of apps you can build at one time.

If you know what you are doing, you may want to choose Apache Cordova. Otherwise, you may want to choose Adobe PhoneGap.

Building using Adobe PhoneGap Build (recommended)

Option 1: Through the web interface

If you haven't already done so, sign up for an Adobe ID and log into the Adobe PhoneGap Build website.

Modify the Savvy config.xml file as necessary as described in the Adobe PhoneGap Build documentation.

Build your application to a zip file using:

$ savvy --src <src_dir> --zip <output_file>

Upload the build file to a the Adobe PhoneGap Build website.

Option 2: From the command-line

To install Adobe PhoneGap, type:

$ npm install phonegap -g

If you haven't already done so, sign up for an Adobe ID.

Modify the Savvy config.xml file as necessary as described in the Adobe PhoneGap Build documentation and remotely build the application as described in the Adobe PhoneGap Build documentation.

For example, to build and test a Savvy application for Android using only the CLI, type:

$ savvy --src <src_dir> --out <output_dir>
$ cd <output_dir>
$ phonegap remote login --username <adobe_email> --password <adobe_password>
$ phonegap remote build android
$ phonegap remote install android
$ phonegap remote logout

For more detailed instructions, see the Adobe PhoneGap Build documentation.

Building using Apache Cordova (advanced)

To install Apache Cordova, type:

$ npm install cordova -g

Create an project in the as described on the Apache Cordova documentation. However, delete the config.xml file in the Apache Cordova project directory. Modify the config.xml file in your Savvy project directory as necessary.

When you are ready to build your application, type:

$ savvy --src <src_dir> --out <cordova_www_dir> --clean

Then build the Apache Cordova application as described in the Apache Cordova documentation.

⚠️ **GitHub.com Fallback** ⚠️