SlideShare a Scribd company logo
Mobile App with Cordova (PhoneGap) 
by Candy Zhuang 
2014-01-09
Content 
● Introduction 
● Set environment 
o Install NodeJS (v0.10.24) 
o Install Cordova by npm 
o Create App with Cordova 
● Add Platforms 
o Add IOS 
o Add Android 
● Deploy to Emulator 
o Emulator iOS 
o Emulator Android
Introduction 
PhoneGap 
Easily create mobile apps (Android, iOS, Windows) using the web technologies you know: 
HTML, CSS, and JavaScript 
http://phonegap.com
Set Environment 
● Install NodeJS 
> nvm install 0.10.24 
> nvm use 0.10.24 
> nvm alias default 0.10.24 
● Install Cordova by npm 
> sudo npm install -g cordova 
● Create the App (project directory) 
> cordova create hello com.example.hello HelloWorld 
● Run within the project’s directory 
> cd hello
Add Platforms - iOS 
● Add iOS Platform 
> cordova platform add ios 
● Build the App 
> cordova prepare (or cordova build) 
● Open it from within Xcode 
Double-click to open the file 
“hello/platforms/ios/hello.xcodeproj”
Add Platforms - Android 
● Requirements and Support 
o Android SDK & ADT Bundle (for Mac) : adt-bundle-mac-x86_64-20131030 
o JDK7 : jdk-7u45-macosx-x64.dmg 
o Ant : apache-ant-1.8.4 (must be v1.8.4) 
● Include SDK’s tools and platform-tools directories in your PATH env. (Mac) 
o Modify ~/.bash_profile 
> vim ~/.bash_profile 
export JAVA_HOME=$(/usr/libexec/java_home) 
export ANT_HOME=~/Documents/and-source/apache-ant-1.8.4 
export PATH=${PATH}:/Users/candychuang/Documents/and-source/adt-bundle-mac-x86_64-20131030/sdk/platform-tools:/ 
Users/candychuang/Documents/and-source/adt-bundle-mac-x86_64-20131030/sdk/tools:$ANT_HOME/bin 
o This exposes SDK tools in newly opened terminal windows 
> source ~/.bash_profile
Add Platforms - Android 
● Add Android Platform 
> cordova platform add android 
● Build the App 
> cordova build 
● Launch the Eclipse application 
o Select the New Project 
o Choose Android Project from Existing Cdoe 
o Navigate to hello -> Finish
Deploy to Emulator - iOS 
● Emulator iOS 
o Make sure the .xcodeproj file is selected in the left panel. 
o Select the hello app in the panel immediately to the right. 
o Select the intended device from the toolbar's Scheme menu, such as the iPhone 6.0 Simulator as 
highlighted here: 
● iOS Platform Guide 
o http://docs.phonegap.com/en/3.3.0/guide_platforms_ios_index.md.html#iOS%20Plat 
form%20Guide 
RUN
Deploy to Emulator - Android 
● Emulator Android 
> cordova emulate android 
● Deploy to Device 
> cordova run android 
● Android Platform Guide 
o http://docs.phonegap.com/en/3.3.0/guide_platforms_android_index.md.html#Androi 
d%20Platform%20Guide

More Related Content

PDF
KivyとPyIntstllerのパッケージ化について
PDF
Bash Scripting
PDF
Php arduino
PDF
Docker links | Docker workshop #2 at Twitter
PPSX
OpenCV installation in windows visual studio
PDF
Controlling Arduino With PHP
PPTX
Laravel Day / Deploy
PDF
2 02-2012
KivyとPyIntstllerのパッケージ化について
Bash Scripting
Php arduino
Docker links | Docker workshop #2 at Twitter
OpenCV installation in windows visual studio
Controlling Arduino With PHP
Laravel Day / Deploy
2 02-2012

Viewers also liked (16)

PDF
Parte.hartzeko.oinarriak
PDF
Getxoko hizkuntzen tribiala
PDF
Maia.egutegia
PDF
สรุปย่อวิชาการศึกษา
PDF
Aurkezpena. 2013ko gidari interkulturalak
PDF
Parte hartzeko oinarriak
PDF
Parte hartzeko oinarriak
PPTX
Power Point Orkut
PPTX
corporate social responsiblity
DOCX
Emerging trends of human resource management
PPT
Japanese culture
PPT
renuka sugar company
PPT
Corporate social responsibility on Indian tobacco company
PPTX
Foreign collaboration
PPTX
Cadbury
PPTX
Job Analysis, Job Design & Job Evaluation
Parte.hartzeko.oinarriak
Getxoko hizkuntzen tribiala
Maia.egutegia
สรุปย่อวิชาการศึกษา
Aurkezpena. 2013ko gidari interkulturalak
Parte hartzeko oinarriak
Parte hartzeko oinarriak
Power Point Orkut
corporate social responsiblity
Emerging trends of human resource management
Japanese culture
renuka sugar company
Corporate social responsibility on Indian tobacco company
Foreign collaboration
Cadbury
Job Analysis, Job Design & Job Evaluation
Ad

Similar to Mobile app with cordova (20)

PDF
[2015/2016] Apache Cordova
PPTX
NCDevCon 2017 - Cross Platform Mobile Apps
PDF
Cordova 101
PDF
Cross Platform Mobile App Development
PDF
iOS App Using cordova
PDF
Using PhoneGap Command Line
PPTX
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PDF
Phonegap Essentials Building Crossplatform Mobile Apps John M Wargo
PPTX
Phone gap
PPTX
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
PDF
Apache Cordova 4.x
PDF
Cordova: APIs and instruments
PDF
Firefox OS in the development process of a HTML5 app with Cordova
PDF
Apache Cordova
PPTX
Hybrid app development frameworks
PDF
Introduction to Cordova
PDF
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
PDF
Introduction to Phonegap
PPTX
[not edited] Demo on mobile app development using ionic framework
PPT
Apache Cordova phonegap plugins for mobile app development
[2015/2016] Apache Cordova
NCDevCon 2017 - Cross Platform Mobile Apps
Cordova 101
Cross Platform Mobile App Development
iOS App Using cordova
Using PhoneGap Command Line
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
Phonegap Essentials Building Crossplatform Mobile Apps John M Wargo
Phone gap
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Apache Cordova 4.x
Cordova: APIs and instruments
Firefox OS in the development process of a HTML5 app with Cordova
Apache Cordova
Hybrid app development frameworks
Introduction to Cordova
Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS
Introduction to Phonegap
[not edited] Demo on mobile app development using ionic framework
Apache Cordova phonegap plugins for mobile app development
Ad

Recently uploaded (6)

DOC
Camb毕业证学历认证,格罗斯泰斯特主教大学毕业证仿冒文凭毕业证
PPTX
ASMS Telecommunication company Profile
PDF
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf
PDF
Lesson 13- HEREDITY _ pedSAWEREGFVCXZDSASEWFigree.pdf
DOC
证书学历UoA毕业证,澳大利亚中汇学院毕业证国外大学毕业证
PDF
heheheueueyeyeyegehehehhehshMedia-Literacy.pdf
Camb毕业证学历认证,格罗斯泰斯特主教大学毕业证仿冒文凭毕业证
ASMS Telecommunication company Profile
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf
Lesson 13- HEREDITY _ pedSAWEREGFVCXZDSASEWFigree.pdf
证书学历UoA毕业证,澳大利亚中汇学院毕业证国外大学毕业证
heheheueueyeyeyegehehehhehshMedia-Literacy.pdf

Mobile app with cordova

  • 1. Mobile App with Cordova (PhoneGap) by Candy Zhuang 2014-01-09
  • 2. Content ● Introduction ● Set environment o Install NodeJS (v0.10.24) o Install Cordova by npm o Create App with Cordova ● Add Platforms o Add IOS o Add Android ● Deploy to Emulator o Emulator iOS o Emulator Android
  • 3. Introduction PhoneGap Easily create mobile apps (Android, iOS, Windows) using the web technologies you know: HTML, CSS, and JavaScript http://phonegap.com
  • 4. Set Environment ● Install NodeJS > nvm install 0.10.24 > nvm use 0.10.24 > nvm alias default 0.10.24 ● Install Cordova by npm > sudo npm install -g cordova ● Create the App (project directory) > cordova create hello com.example.hello HelloWorld ● Run within the project’s directory > cd hello
  • 5. Add Platforms - iOS ● Add iOS Platform > cordova platform add ios ● Build the App > cordova prepare (or cordova build) ● Open it from within Xcode Double-click to open the file “hello/platforms/ios/hello.xcodeproj”
  • 6. Add Platforms - Android ● Requirements and Support o Android SDK & ADT Bundle (for Mac) : adt-bundle-mac-x86_64-20131030 o JDK7 : jdk-7u45-macosx-x64.dmg o Ant : apache-ant-1.8.4 (must be v1.8.4) ● Include SDK’s tools and platform-tools directories in your PATH env. (Mac) o Modify ~/.bash_profile > vim ~/.bash_profile export JAVA_HOME=$(/usr/libexec/java_home) export ANT_HOME=~/Documents/and-source/apache-ant-1.8.4 export PATH=${PATH}:/Users/candychuang/Documents/and-source/adt-bundle-mac-x86_64-20131030/sdk/platform-tools:/ Users/candychuang/Documents/and-source/adt-bundle-mac-x86_64-20131030/sdk/tools:$ANT_HOME/bin o This exposes SDK tools in newly opened terminal windows > source ~/.bash_profile
  • 7. Add Platforms - Android ● Add Android Platform > cordova platform add android ● Build the App > cordova build ● Launch the Eclipse application o Select the New Project o Choose Android Project from Existing Cdoe o Navigate to hello -> Finish
  • 8. Deploy to Emulator - iOS ● Emulator iOS o Make sure the .xcodeproj file is selected in the left panel. o Select the hello app in the panel immediately to the right. o Select the intended device from the toolbar's Scheme menu, such as the iPhone 6.0 Simulator as highlighted here: ● iOS Platform Guide o http://docs.phonegap.com/en/3.3.0/guide_platforms_ios_index.md.html#iOS%20Plat form%20Guide RUN
  • 9. Deploy to Emulator - Android ● Emulator Android > cordova emulate android ● Deploy to Device > cordova run android ● Android Platform Guide o http://docs.phonegap.com/en/3.3.0/guide_platforms_android_index.md.html#Androi d%20Platform%20Guide