Cordova & Cordova Plugin Installation and Management

Slides:



Advertisements
Similar presentations
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Ashish Mishra Automation Lifecycle of Mobile Applications.
Advertisements

Web Toolkit Julie George & Ronald Lopez 1. Requirements  Java SDK version 1.5 or later  Apache Ant is also necessary to run command line arguments 
1 Mobile Computing Mobile First (formerly Worklight) Copyright 2015 by Janson Industries.
Android: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
Eclipse Introduction Dwight Deugo Nesa Matic
XMAS installation instructions Windows Version: 1.0 4/22/2008.
Lab 1 Instructor: Jolanta Soltis.
How to install Java CSC 2310 D M Rasanjalee. Steps 1.Download Java 2.Install Java 3.Update Path environmental variable 4.Verify Installation.
Views Dwight Deugo Nesa Matic
1 Plug-in Development Environment (PDE) Guide. 2 Introduction to PDE l What is PDE: »a tool designed to help you develop platform plug-ins while working.
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
Getting Started with Android Programming Note: if you have already installed android development tools, please check that you have the same version as.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
Eclipse Overview Introduction to Web Programming Kirkwood Continuing Education Fred McClurg © Copyright 2015, Fred McClurg, All Rights Reserved.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
Introducing NativeScript [Pavel Kolev Software Telerik: a Progress company]
SchwartzGBIF Nodes III29 April 2003 DiGIR Portal Installation And Configuration.
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Java and C# [this is a bonus – it is not a required lesson] ACO101: Introduction to Computer Science.
( ) 1 ISYE 7210—Fall 2005 Design of Real-Time Interactive Simulations (in Java) Initial Notes Christine M. Mitchell Director & Professor Center for.
An Introduction to Front-end Web Development Tom Perkins.
Selenium Web Test Tool Training Discover The Automating Power Of Selenium Author : Girija Prasad Panda Alcatel-Lucent.
Android Development Environment Environment/tools Windows Eclipse IDE for Java Developers (v3.5 Galileo) Java Platform (JDK 6 Update 18) Android.
EIE375 BlueJ: Getting Started Dr Lawrence Cheung.
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
Ergo User Tutorial NCSA, UIUC. What is Ergo?  As an IT framework  Ergo-EQ is built on Ergo Platform  A.K.A. MAEviz, EQviz (a fork by EU), HazTurk (
PART 2 INTRODUCTION TO DYNAMIC WEB CONTENT AND PHP.
Ionic & Cordova crash course Ivan Varga
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
APP DESIGN AND DEVELOPMENT WITH THE IONIC FRAMEWORK Chuck Leone
Guide To Develop Mobile Apps With Titanium. Agenda Overview Installation of Platform SDKs Pros of Appcelerator Titanium Cons of Appcelerator Titanium.
PhoneGap. web-based mobile development framework, based on the open-source Cordova project. use standard web technologies such as HTML5, CSS3, and JavaScript.
Platform & Maven2 David Šimonek. Certified Engineer Course Agenda What is Maven? Why Maven? NB IDE & Maven NB Platform & Maven.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Day 1 Session 2. Setup & Installation
ClickOnce Deployment (One-click Deployment)
Labs: Create, deploy and test a simple web service
Building Desktop Apps with Node.js and Electron
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
Hadoop Architecture Mr. Sriram
Before You Begin Nahla Abuel-ola /WIT.
What are they? The Package Repository Client is a set of Tcl scripts that are capable of locating, downloading, and installing packages for both Tcl and.
Tutorial 2 Programming Editors Recommendation & Cordova Plugin Installation and Management Li Xu Department of Systems Engineering.
SEEM4570 Tutorial 1:Software Installation
Obtaining the Required Tools
ATS Application Programming: Java Programming
3 Things Everyone Knows About Node JS That You Don't
Multi-Device Hybrid Apps What, Why, and When to Use Hybrid Development Option Ervin Loh ALM Program Manager
Node.js Packages Header Mastering Node.js, Part 4 Eric W. Greene
Automation for mobile apps Presenter: Nikita Mader
Installing OpenRefine
Compile, Build, and Debug
University of Texas Rio Grande Valley Systems Administration CSCI 6175
Automation with Gwen Introduction.
And I have to create mobile apps too?
How to Improve Releasing Efficiency via i18N/L10n Test Automation.
Tutorial 6 PHP & MySQL Li Xu
F II 1. Background Objectives
Lecture 12: The Fetch Api and AJAx
Chapter 2 Ionic Installation
Carthage ios 8 onwards Dependency manager that streamlines the process of integrating the libraries into the project.
Introduce to Angular 6 Present by: Võ Văn Hào
Review of Previous Lesson
MOBILE PROGRAMMING Meriska Defriani, S.Komp, M.Kom Introduction
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

Cordova & Cordova Plugin Installation and Management Tutorial 2 Cordova & Cordova Plugin Installation and Management Li Xu Email: xuli@se.cuhk.edu.hk Department of Systems Engineering and Engineering Management

Overview Cordova Installation Node.js Installation jdk Installation ant Installation How to create a new Cordova project Cordova-Simulate Cordova Plugin Installation and Management

Cordova Installation 4 Steps : Install node.js Install jdk Install ant Install cordova

Cordova Installation - Install node.js What is NodeJS? A JavaScript runtime built on Chrome‘s JavaScript Engine Using the NodeJS package ecosystem called  “npm” to get all the necessary libraries and frameworks onto our local development machine At this time, “npm” is the largest ecosystem of open source libraries in the world Why it is necessary for Cordova Installation? We use “npm” to install the necessary files NodeJS is a JavaScript runtime built on Chrome‘s JavaScript Engine. Today, we’ll be using the NodeJS package ecosystem called npm. This helps us get all the necessary libraries and frameworks onto our local development machine. At the time of this writing, npm is the largest ecosystem of open source libraries in the world. What is the differences between “npm” and “nvm”? “nvm” is used to manage the version of NodeJS and “npm” “npm” is installed together with NodeJS package, and manages the plugins of NodeJS.

Cordova Installation - Install node.js (Windows) Download node.js https://nodejs.org/en/ Get node-v6.11.3-x64.msi

Cordova Installation - Install node.js (Windows) This shows node.js installed successfully

Cordova Installation - Install node.js (Mac) Download node.js https://nodejs.org/en/download/ Get node-v8.12.0.pkg

Cordova Installation - Install node.js (Mac) This shows node.js installed successfully

Cordova Installation - Install jdk What is JDK? Java SE Development Kit (JDK) Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications Why it is necessary for Cordova Installation? Includes a JRE to provide java runtime environment Provide necessary tools for java applications

Cordova Installation - Install jdk (Windows) Download java http://www.oracle.com/technetwork/java/javase/d ownloads/index.html Get jdk-8u144-windows-x64.exe

Cordova Installation - Install jdk (Windows) Configure environment variables (D:\softwareData\)java\jdk1.8.0_144\bin (D:\softwareData\)java\jre1.8.0_144\bin

Cordova Installation - Install jdk (Windows) This shows jdk installed successfully

Cordova Installation - Install jdk (Mac) Download java https://www.oracle.com/technetwork/java/javase/ downloads/jdk8-downloads-2133151.html Get jdk-8u181-macosx-x64.dmg

Cordova Installation - Install ant What is ant? A Java library and command-line tool Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications. Ant can also be used effectively to build non Java applications, for instance C or C++ applications. More generally, Ant can be used to pilot any type of process which can be described in terms of targets and tasks. and Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other. The main known usage of Ant is the build of Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications. Ant can also be used effectively to build non Java applications, for instance C or C++ applications. More generally, Ant can be used to pilot any type of process which can be described in terms of targets and tasks. Why it is necessary for Cordova Installation? The main known usage of Ant is the build of Java applications.

Cordova Installation - Install ant (Windows) Download ant https://www.apache.org/dist/ant/binaries/ Get apache-ant-1.10.1-bin.zip Unzip this .zip file to a specified folder like D:\apache-ant- 1.10.1 Configure environment variables D:\apache-ant-1.10.1\bin Copy tools.jar from (D:\softwareData)\java\jdk1.8.0_144\lib to (D:\softwareData)\java\jre1.8.0_144\lib This shows ant installed successfully

Cordova Installation - Install ant (Mac) Download ant https://https://ant.apache.org/bindownload.cgi Get apache-ant-1.10.5-bin.tar.gz Double Click this .tar.gz file to a specified folder like /Users/xli/Desktop/Applications/ant Add the following path into the system PATH variable via the “.bash_profile” file: /Users/xli/Desktop/Applications/ant/bin This shows ant installed successfully

Cordova Installation - Install cordova (Windows) Type “npm install –g cordova” at a command prompt If you get this, installment is successful If you get “’cordova’” is not recognized as an internal or external command’ after typing above command statement, check your environment path. There should be one named “(c:\users\YourUserName)\AppData\Roaming\npm\”. It should be added automatically when installing node.js. If there isn’t one, add it.

Cordova Installation - Install cordova (Mac) Type “npm install cordova –prefix=/your_dir/Cordova -g” at a command prompt Add the path “/your_dir/Cordova/bin” to your system “PATH” variable via the “.bash_profile” file This shows Cordova installed successfully

How to create a new Cordova project (Windows and mac) Go to the directory where you maintain your source code, and create a cordova project: E.g.: cordova create hello com.example.hello HelloWorld Add the platforms that you want to target your app. Before doing this, you need to access your project’s directory first: E.g.: cd hello; cordova platform add ios To check your current set of platforms: E.g.: cordova platform ls More detailed information about creating Cordova projects: https://cordova.apache.org/docs/en/latest/guide/cli/index.html

Cordova-Simulate (Windows and mac) Install the package “cordova-simulate”: npm install –g cordova-simulate –prefix=/your_dir/Cordova-Simulate Mac: add the path “/your_dir/Cordova-Simulate” to your system “PATH” variable via the “.bash_profile” file; Windows: add that path into your system path variable using the way mentioned in Page 11 From the command line anywhere within a Cordova project, enter the following: Simulate [<platform>] [--target=<browser>] where platform is any Cordova platform that has been added to your project. Defaults to browser browser is the name of the browser to launch your app in. Can be any of the following: default, chrome, chromium, edge, firefox, ie, opera, safari Now I will show you an example on mac, the command working on windows systems is exactly the same as this.

Cordova Plugin Installation and Management What are plugins and what are they used for? 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. When you build and view a new project, the default application that appears doesn't do very much. You can modify the app in many ways to take advantage of standard web technologies, but for the app to communicate closely with various device-level features, you need to add plugins that provide access to core Cordova APIs.

Cordova Plugin Installation and Management How to install the plugins you want? You can use the command “cordova plugin search + package name” to search plugins you are interested in, and use the command “cordova plugin add + package name” to install them (They can also be added using a directory or a git repo).

Cordova Plugin Installation and Management Using Plugman to Manage Plugins 1.Installing Plugman: $ npm install –g plugman 2.Create a Cordova Project 3.Adding a Plugin: $ plugman install --platform <ios|android|blackberry10|wp8> --project <directory> --plugin <name|url|path> name: The directory name where the plugin contents exist. url: A URL starting with https:// or git://, pointing to a valid git repository that is clonable and contains a plugin.xml file. path: A path to a directory containing a valid plugin which includes a plugin.xml file.

Cordova Plugin Installation and Management Using Plugman to Manage Plugins 4.Remove a Plugin $ plugman uninstall --platform <ios|android|blackberry10|wp8> --project <directory> --plugin <id> 5.Help Commands $ plugman -help 6.Registry Actions Searching for a Plugin: plugman search <plugin keywords> Changing the Plugin Registry: plugman config set registry <url-to-registry> plugman config get registry Get Plugin Information: plugman info <id>

Questions and Answers