Platform-Specific Deployment
The instructions that follow assume that you have completed the development phase of an Enyo-based application as well as the optimization phase (i.e., running enyo pack
with production options to remove any unnecessary files from the project) and that you are now ready to create a final product for deployment to your platform of choice.
Deploying as a Mobile Application
Deploying to iOS Using Cordova (PhoneGap)
Follow the instructions in the Cordova Getting Started Guide to install Cordova and create a basic iOS Cordova app.
Now drop the files from the
dist
directory into thewww
directory created in step 1. (Tip: you can specify the output directory forenyo pack
using the-d
/--outdir
option.)
From here you can follow the instructions in the Cordova Getting Started Guide to deploy to the simulator or device. To submit your app to the Apple App Store, you'll need to sign up for a developer account and review the documentation provided at http://developer.apple.com.
Finally, if your project requires access to Cordova's native functionality, follow the directions in Making Use of Cordova's Native Functions.
Deploying to Android Using Cordova
Follow the instructions in the Cordova Getting Started Guide to install Cordova and create a basic Android Cordova app.
Now drop the files from the
dist
directory into thewww
directory created in step 1. (Tip: you can specify the output directory forenyo pack
using the-d
/--outdir
option.)
From here you can follow the instructions in the Cordova Getting Started Guide to deploy to the emulator or device. To publish your app on Google Play, you'll need to sign up for a developer account and review the documentation provided at http://developer.android.com.
Finally, if your project requires access to Cordova's native functionality, follow the directions in Making Use of Cordova's Native Functions.
Deploying to Windows Phone Using Cordova
Follow the instructions in the Cordova Getting Started Guide to install Cordova and create a basic Windows Phone Cordova app.
Add the following viewport rule to
css/index.css
for proper display on device:@-ms-viewport { width: device-width; height: device-height; user-zoom: fixed; max-zoom: 1; min-zoom: 1; }
Package your app after making the CSS change and drop the files from the
dist
directory into thewww
directory created in step 1. (Tip: you can specify the output directory forenyo pack
using the-d
/--outdir
option.)
From here you can follow the instructions in the Cordova Getting Started Guide to deploy to the simulator or device. To submit your app to the Microsoft Windows Phone Store, you'll need to sign up for a developer account and review the documentation provided at https://dev.windowsphone.com/en-us.
Finally, if your project requires access to Cordova's native functionality, follow the directions in Making Use of Cordova's Native Functions.
Deploying to Open webOS Using Cordova
You may recall that Enyo 1.0 was the preferred framework for developing applications in webOS 3.0.x. Enyo 1.0 was tightly integrated with the operating system, providing many webOS-specific features to facilitate app development.
With Enyo 2 and Open webOS, however, the framework and OS have been decoupled; you are free to use either one alone, or both of them together. If you use them together, please be aware that Enyo 2 no longer contains functionality specific to webOS.
The Open webOS team recommends that you use the Cordova JavaScript library to provide the layer connecting application and device.
If, for example, you want to use the Bootplate template app with Open webOS, first modify the <head>
section of Bootplate's index.html
file by inserting the following line to load Cordova before Enyo:
<script src="cordova-2.7.0.js"></script>
Enyo supports Cordova events out of the box; you may subscribe to them using enyo/Signals
. To listen for Cordova's startup event (onDeviceReady
), add the following to your main app kind's components
block:
var Signals = require('enyo/Signals');
{kind: Signals, ondeviceready: "deviceready"}
onDeviceReady
will be sent as soon as Cordova detects that the device is ready. If you need to call any Cordova functions on initialization, simply place them in the deviceready()
function.
Additional information on using Enyo with Open webOS is available on the Open webOS Web site.
Deploying as a Mobile App Using PhoneGap Build
Create a zip file of your project.
Upload the zip file into your PhoneGap Build application (follow the instructions on the Web site).
PhoneGap Build outputs application packages for various platforms.
Deploying as a Google Chrome Application
Create a
manifest.json
file in your application's root directory, e.g.:{ "name": "Testplate", "version": "1.0", "manifest_version": 1, "description": "Enyo extension.", "app": { "launch": { "local_path": "index.html" } } }
In Google Chrome, choose Tools|Extensions, then pick Load Unpacked Extension and select your deployment folder (e.g.,
myapp-deploy
).A generic application icon appears on your Chrome Apps page that will invoke this app.
Refer to the Chrome documentation for more information on manifest files and the actual packaging of an application.
Deploying as a Windows 10 App
For information on building apps for PCs, tablets, and phones running Windows 10, to be deployed via the Windows Store, please see Enyo Apps on Windows 10.
Deploying as an Installable Windows Application
Intel has discontinued its online Encapsulator tool for creating Windows executables from Web applications. However, they have published an article on their Web site providing detailed instructions for building your own app container.
Additional Reading