Repository URL to install this package:
|
Version:
1.0.0 ▾
|
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
<title>Create your first App</title>
<link type="text/css" rel="stylesheet" href="../assets/css/github-markdown.css">
<link type="text/css" rel="stylesheet" href="../assets/css/pilcrow.css">
<link type="text/css" rel="stylesheet" href="../assets/css/hljs-github.min.css"/>
</head>
<body>
<article class="markdown-body"><h1 id="create-your-first-app"><a class="header-link" href="#create-your-first-app"></a>Create your first App</h1>
<p>An hybrid Dynamic Engine App is Cordova based, then the first step is to creating a new project with Cordova tools.
For this you can refers to the official Cordova documentation: [Create your first Cordova app] (<a href="https://cordova.apache.org/docs/en/latest/guide/cli/index.html">https://cordova.apache.org/docs/en/latest/guide/cli/index.html</a>)</p>
<h2 id="1---installing-cordova"><a class="header-link" href="#1---installing-cordova"></a>1 - Installing Cordova</h2>
<p>Cordova command-line runs on Node.js and is available on NPM. Follow platform specific guides to install additional platform dependencies. Open a command prompt or Terminal, and type</p>
<pre class="hljs"><code>npm <span class="hljs-keyword">install</span> -g cordova</code></pre><h2 id="2---create-a-project"><a class="header-link" href="#2---create-a-project"></a>2 - Create a project</h2>
<p>Create a blank Cordova project using the command-line tool. Navigate to the directory where you wish to create your project and type cordova create <path>.</p>
<pre class="hljs"><code><span class="hljs-attribute">cordova create MyApp</span></code></pre><p>For a complete set of options, type cordova help create.</p>
<h2 id="3---add-a-platform"><a class="header-link" href="#3---add-a-platform"></a>3 - Add a platform</h2>
<p>After creating a Cordova project, navigate to the project directory. From the project directory, you need to add a platform for which you want to build your app.</p>
<p>To add a platform, type cordova platform add <platform name>.</p>
<pre class="hljs"><code>cd MyApp
cordova <span class="hljs-built_in">platform</span> <span class="hljs-built_in">add</span> ios <span class="hljs-comment">--save</span></code></pre><p>To check your current set of platforms:</p>
<pre class="hljs"><code>cordova <span class="hljs-keyword">platform</span> ls</code></pre><p>For a complete list of platforms you can add, run cordova platform.</p>
<h2 id="4---build-your-app"><a class="header-link" href="#4---build-your-app"></a>4 - Build your app</h2>
<p>From the command line, run cordova build <platform name>.</p>
<pre class="hljs"><code><span class="hljs-symbol">cordova</span> <span class="hljs-keyword">build </span>ios</code></pre><h2 id="5---run-your-app"><a class="header-link" href="#5---run-your-app"></a>5 - Run your app</h2>
<p>From the command line, run cordova run <platform name>.</p>
<pre class="hljs"><code>cordova <span class="hljs-keyword">run</span><span class="bash"> ios</span></code></pre><h1 id="add-plugins"><a class="header-link" href="#add-plugins"></a>Add Plugins</h1>
<p>You can modify the default generated app to take advantage of standard web technologies, but for the app to access device-level features, you need to add plugins.</p>
<p>A plugin exposes a Javascript API for native SDK functionality. Plugins are typically hosted on npm and you can search for them on the plugin search page. Some key APIs are provided by the Apache Cordova open source project and these are referred to as Core Plugin APIs. You can also use the CLI to launch the search page:</p>
<pre class="hljs"><code>cordova <span class="hljs-keyword">plugin</span> <span class="hljs-keyword">search</span> camera</code></pre><p>To add the camera plugin, we will specify the npm package name for the camera plugin:</p>
<pre class="hljs"><code>cordova plugin <span class="hljs-built_in">add</span> cordova-plugin-<span class="hljs-built_in">camera</span> --<span class="hljs-built_in">save</span></code></pre><p>See Also</p>
<ul class="list">
<li><a href="https://cordova.apache.org/docs/en/latest/reference/cordova-cli/index.html#cordova-plugin-command">Cordova plugin command reference documentation</a></li>
<li><a href="https://cordova.apache.org/plugins/">Cordova plugin search page</a></li>
<li><a href="https://cordova.apache.org/docs/en/latest/guide/support/index.html#core-plugin-apis">Core Plugin APIs</a></li>
</ul>
</article>
</body>
</html>