SlideShare a Scribd company logo
1 of 25
Wrapping with PhoneGap
Learning from my
barely-competent fumbling
Karl Bunyan, Wedu Games
Overview
• Building the app
• Setting up PhoneGap
• Customising
• Available Features
• Testing
• Gotchas
• Submitting
About PhoneGap
Allows you to package HTML apps for the App
Store and Google Play
• PhoneGap: generates files locally
• PhoneGap Build: upload your files, download
store-ready packages
• Apache Cordova: the root of PhoneGap
About me
• Long-time web developer since late 90s
• Ad-hoc game developer since late 80s
• Involved in social* apps and games since 2007
• Worked for GSN making games for Facebook
• Currently doing my own thing
* and anti-social
The App: PPL Tutor
Building the App
• Regular HTML, JavaScript, CSS, images
• Develop and test in a desktop browser
alongside devices
• Use responsive CSS (media queries) for
different screen sizes and aspect ratios:
– Tablet landscape; tablet portrait; phone portrait
Things you’ll need
• A computer
• A Mac, if you’re building for iOS
– With Xcode installed. It comes with emulators.
• The Android SDK
– The Eclipse package is pretty good
• Accounts and certificates:
– iTunes Connect, Certificates, Provisioning Profiles,
Google Wallet, Google Developer
Setting up PhoneGap
• Install NodeJS, Git, JDK and Ant. Set PATHs.
• Download files with Git
• Use NodeJS Package Manager to install
• Create the app on the command line
• Add platforms
• Run a build command
• Sit back and admire your files
The File Structure: Pre-build
Root
merges
platforms
plugins
www
Platform-specific files (never worked this out)
Where files end up after build
Extra features go here
Your HTML source files live here
The File Structure: Post-build
assets: where your HTML ends up
platform-specific source files
platform_www: platform-specific HTML/JS
platforms
android
ios
assets
PhoneGap
folders
platform_www
Config
files
config files (depending on the platform)
The Build/Test Cycle
• Add platform(s)
• Run build command
– Generates platform-specific folder + source code
– Copies from root/www to
root/platforms/[platform]/assets/www
• Changes made to assets/www are overwritten
• Open the project in Xcode
• Run it on the device or emulator
Customising 1: Config Files
• Limit screen orientation
• Specify splash screen
• Specify file to load: index.html
• App icons
Config files are different for each platform,
although (in theory) generated from a single
source
Customising 2: Source Code
E.g. Preventing the iOS 7 battery meter from
overlapping your application
• Open XCode
• Tweak the Objective-C
except
• Next time you run build your changes will be
overwritten
Available Features
Includes:
• Camera
• Accelerometer
• Geolocation
• Network connectivity
• In-app purchases
• Local storage
Plug-ins
Plugins are a mixture of Objective-C or Java
source code and JavaScript. E.g.:
• Network connectivity:
– Cross-platform plug-in
• In-app Purchases
– Different plug-in for iOS and Android
Plug-ins
Installing a plug-in:
• Use Git to download
• Command line to install
• Re-run build
– Which may lose your customisation changes
Or install by hand:
• Installing a plug-in by hand is not fun
Aside: My Code Management
• Run build only once, and then customise
• Set launch to
index.html?platform=[platform]
• platforms/[platform]/platform_www
symlinked to a single app file source
• Detect “platform=“ on the query string to
include the correct JS plug-in config file
• Include object detection in JavaScript to
determine how to deliver a feature
In-app purchases
• Make sure they’re set-up correctly in iTunes
Connect/Google Play
• Make sure test accounts are set up
• Download and install the plug-ins:
– iOS: cc.fovea.plugins.inapppurchase
– Android: com.smartmobilesoftware.inappbilling
• Follow the documentation religiously
Testing your code
• Install the plug-in for console logging
• Use simulators in Xcode
• Android emulators via device manager:
– GUI started from command line or from Eclipse
• Test directly on plugged-in devices
• Android: build and e-mail APKs
• iOS: archive in Xcode, build for Ad-hoc
distribution, use TestFlight
Testing in-app purchases
• Black-box systems: reports success or failure
• iOS test accounts
– Do not add credit card details
– Test on emulators or device
• Android test accounts
– do not use the e-mail address on your device for
developer or Wallet accounts
– Have to test on live devices: no emulators
Other gotchas
• Never skim the docs
• Android failed to load some folders that
started with underscores
• Do not try to download JavaScript in-app
• For first-time setup, use test namespaces in
iTunes Connect: you will mess it up
• Never ever skim the docs
Submitting
Google Play
• Remove debug settings
• Increment version number
• Build and upload
• Wait 15 minutes or so
Submitting
iOS App Store
• Set up certificates and provisioning
• Log into iTunes Connect:
– Add a new version of the app
– Add any in-app purchases for this version
– Mark as “Waiting for upload”
• Archive in Xcode and distribute
• Submit, wait and hope
£££ Profit £££!
Questions
PPL Tutor is free on
iTunes and Google Play
karl@wedugames.com
twitter.com/karlbunyan

More Related Content

What's hot

Marmalade: bittersweet experience
Marmalade: bittersweet experienceMarmalade: bittersweet experience
Marmalade: bittersweet experienceMax Klyga
 
DNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With XamarinDNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With XamarinMark Allan
 
Adventures in cross platform ConnectJS / TiConnect 2014
Adventures in cross platform ConnectJS / TiConnect 2014Adventures in cross platform ConnectJS / TiConnect 2014
Adventures in cross platform ConnectJS / TiConnect 2014Jason Kneen
 
Mobile App Development Using Appcelerator and DNN WebAPIs
Mobile App Development Using Appcelerator and DNN WebAPIsMobile App Development Using Appcelerator and DNN WebAPIs
Mobile App Development Using Appcelerator and DNN WebAPIsDNN
 
Introduction to tvOS app Development !
Introduction to tvOS app Development !Introduction to tvOS app Development !
Introduction to tvOS app Development !Snehal Patil
 
Inspect The Uninspected
Inspect The UninspectedInspect The Uninspected
Inspect The Uninspectedcgack
 
Introduction to Xamarin Forms
Introduction to Xamarin Forms Introduction to Xamarin Forms
Introduction to Xamarin Forms Russ Fustino
 
Java script programming language
Java script programming language Java script programming language
Java script programming language Asif H Tamim
 
Dnn connect dnnmobi-slides
Dnn connect dnnmobi-slidesDnn connect dnnmobi-slides
Dnn connect dnnmobi-slidesashishpd
 
Mistakes I Made Building Netflix for the iPhone
Mistakes I Made Building Netflix for the iPhoneMistakes I Made Building Netflix for the iPhone
Mistakes I Made Building Netflix for the iPhonekentbrew
 
Сергей Батищев: 2D игры на HTML5: мифы и реальность разработки
Сергей Батищев: 2D игры на HTML5: мифы и реальность разработкиСергей Батищев: 2D игры на HTML5: мифы и реальность разработки
Сергей Батищев: 2D игры на HTML5: мифы и реальность разработкиDevGAMM Conference
 
An overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksAn overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksSasha dos Santos
 
20 x Tips to better Optimize your Flash content
20 x Tips to better Optimize your Flash content20 x Tips to better Optimize your Flash content
20 x Tips to better Optimize your Flash contentElad Elrom
 
SydPHP May 2012 - Deployment
SydPHP May 2012 - DeploymentSydPHP May 2012 - Deployment
SydPHP May 2012 - DeploymentGraham Weldon
 
Snappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember AppsSnappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember AppsMatthew Beale
 
DNN Web API For Mobile
DNN Web API For MobileDNN Web API For Mobile
DNN Web API For Mobileashishpd
 
Dev traning 2016 symfony
Dev traning 2016   symfonyDev traning 2016   symfony
Dev traning 2016 symfonySacheen Dhanjie
 

What's hot (20)

fpadvanced
fpadvancedfpadvanced
fpadvanced
 
Marmalade: bittersweet experience
Marmalade: bittersweet experienceMarmalade: bittersweet experience
Marmalade: bittersweet experience
 
DNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With XamarinDNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With Xamarin
 
Adventures in cross platform ConnectJS / TiConnect 2014
Adventures in cross platform ConnectJS / TiConnect 2014Adventures in cross platform ConnectJS / TiConnect 2014
Adventures in cross platform ConnectJS / TiConnect 2014
 
Ohoh
OhohOhoh
Ohoh
 
Mobile App Development Using Appcelerator and DNN WebAPIs
Mobile App Development Using Appcelerator and DNN WebAPIsMobile App Development Using Appcelerator and DNN WebAPIs
Mobile App Development Using Appcelerator and DNN WebAPIs
 
Introduction to tvOS app Development !
Introduction to tvOS app Development !Introduction to tvOS app Development !
Introduction to tvOS app Development !
 
Inspect The Uninspected
Inspect The UninspectedInspect The Uninspected
Inspect The Uninspected
 
Ember At Scale
Ember At ScaleEmber At Scale
Ember At Scale
 
Introduction to Xamarin Forms
Introduction to Xamarin Forms Introduction to Xamarin Forms
Introduction to Xamarin Forms
 
Java script programming language
Java script programming language Java script programming language
Java script programming language
 
Dnn connect dnnmobi-slides
Dnn connect dnnmobi-slidesDnn connect dnnmobi-slides
Dnn connect dnnmobi-slides
 
Mistakes I Made Building Netflix for the iPhone
Mistakes I Made Building Netflix for the iPhoneMistakes I Made Building Netflix for the iPhone
Mistakes I Made Building Netflix for the iPhone
 
Сергей Батищев: 2D игры на HTML5: мифы и реальность разработки
Сергей Батищев: 2D игры на HTML5: мифы и реальность разработкиСергей Батищев: 2D игры на HTML5: мифы и реальность разработки
Сергей Батищев: 2D игры на HTML5: мифы и реальность разработки
 
An overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksAn overview of mobile html + java script frameworks
An overview of mobile html + java script frameworks
 
20 x Tips to better Optimize your Flash content
20 x Tips to better Optimize your Flash content20 x Tips to better Optimize your Flash content
20 x Tips to better Optimize your Flash content
 
SydPHP May 2012 - Deployment
SydPHP May 2012 - DeploymentSydPHP May 2012 - Deployment
SydPHP May 2012 - Deployment
 
Snappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember AppsSnappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember Apps
 
DNN Web API For Mobile
DNN Web API For MobileDNN Web API For Mobile
DNN Web API For Mobile
 
Dev traning 2016 symfony
Dev traning 2016   symfonyDev traning 2016   symfony
Dev traning 2016 symfony
 

Similar to Wrapping with PhoneGap

Continous Integration for iOS Projects
Continous Integration for iOS ProjectsContinous Integration for iOS Projects
Continous Integration for iOS ProjectsCiprian Redinciuc
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy VirinCocoaHeads France
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introductionsnevesbarros
 
Test+video+upload
Test+video+uploadTest+video+upload
Test+video+uploadTianwei_liu
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application SecurityEgor Tolstoy
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsSasha dos Santos
 
2011 code camp
2011 code camp2011 code camp
2011 code campimranq2
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms BootcampMike Melusky
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsJohn M. Wargo
 
Skip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildSkip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildTerry Ryan
 
Cordova: APIs and instruments
Cordova: APIs and instrumentsCordova: APIs and instruments
Cordova: APIs and instrumentsIvano Malavolta
 
iOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET GuyiOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET GuyNick Landry
 

Similar to Wrapping with PhoneGap (20)

Continous Integration for iOS Projects
Continous Integration for iOS ProjectsContinous Integration for iOS Projects
Continous Integration for iOS Projects
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
 
Cordova 101
Cordova 101Cordova 101
Cordova 101
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introduction
 
Titanium Mobile
Titanium MobileTitanium Mobile
Titanium Mobile
 
Test+video+upload
Test+video+uploadTest+video+upload
Test+video+upload
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
 
Apache Cordova
Apache CordovaApache Cordova
Apache Cordova
 
2011 code camp
2011 code camp2011 code camp
2011 code camp
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
 
Android
AndroidAndroid
Android
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
Skip the IDE with PhoneGap Build
Skip the IDE with PhoneGap BuildSkip the IDE with PhoneGap Build
Skip the IDE with PhoneGap Build
 
Cordova: APIs and instruments
Cordova: APIs and instrumentsCordova: APIs and instruments
Cordova: APIs and instruments
 
iOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET GuyiOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET Guy
 

More from Karl Bunyan

Indie Game Developers and the Facebook of Doom
Indie Game Developers and the Facebook of DoomIndie Game Developers and the Facebook of Doom
Indie Game Developers and the Facebook of DoomKarl Bunyan
 
Dont Give Up Crappy App
Dont Give Up Crappy AppDont Give Up Crappy App
Dont Give Up Crappy AppKarl Bunyan
 
Five Ingredients For A Facebook Game
Five Ingredients For A Facebook GameFive Ingredients For A Facebook Game
Five Ingredients For A Facebook GameKarl Bunyan
 
Facebook Connect Presentation 08 10 2008
Facebook Connect Presentation 08 10 2008Facebook Connect Presentation 08 10 2008
Facebook Connect Presentation 08 10 2008Karl Bunyan
 
Making Money With Facebook Applications
Making Money With Facebook ApplicationsMaking Money With Facebook Applications
Making Money With Facebook ApplicationsKarl Bunyan
 
Scaling a Facebook Application
Scaling a Facebook ApplicationScaling a Facebook Application
Scaling a Facebook ApplicationKarl Bunyan
 

More from Karl Bunyan (6)

Indie Game Developers and the Facebook of Doom
Indie Game Developers and the Facebook of DoomIndie Game Developers and the Facebook of Doom
Indie Game Developers and the Facebook of Doom
 
Dont Give Up Crappy App
Dont Give Up Crappy AppDont Give Up Crappy App
Dont Give Up Crappy App
 
Five Ingredients For A Facebook Game
Five Ingredients For A Facebook GameFive Ingredients For A Facebook Game
Five Ingredients For A Facebook Game
 
Facebook Connect Presentation 08 10 2008
Facebook Connect Presentation 08 10 2008Facebook Connect Presentation 08 10 2008
Facebook Connect Presentation 08 10 2008
 
Making Money With Facebook Applications
Making Money With Facebook ApplicationsMaking Money With Facebook Applications
Making Money With Facebook Applications
 
Scaling a Facebook Application
Scaling a Facebook ApplicationScaling a Facebook Application
Scaling a Facebook Application
 

Recently uploaded

%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 

Recently uploaded (20)

%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 

Wrapping with PhoneGap

  • 1. Wrapping with PhoneGap Learning from my barely-competent fumbling Karl Bunyan, Wedu Games
  • 2. Overview • Building the app • Setting up PhoneGap • Customising • Available Features • Testing • Gotchas • Submitting
  • 3. About PhoneGap Allows you to package HTML apps for the App Store and Google Play • PhoneGap: generates files locally • PhoneGap Build: upload your files, download store-ready packages • Apache Cordova: the root of PhoneGap
  • 4. About me • Long-time web developer since late 90s • Ad-hoc game developer since late 80s • Involved in social* apps and games since 2007 • Worked for GSN making games for Facebook • Currently doing my own thing * and anti-social
  • 5. The App: PPL Tutor
  • 6. Building the App • Regular HTML, JavaScript, CSS, images • Develop and test in a desktop browser alongside devices • Use responsive CSS (media queries) for different screen sizes and aspect ratios: – Tablet landscape; tablet portrait; phone portrait
  • 7. Things you’ll need • A computer • A Mac, if you’re building for iOS – With Xcode installed. It comes with emulators. • The Android SDK – The Eclipse package is pretty good • Accounts and certificates: – iTunes Connect, Certificates, Provisioning Profiles, Google Wallet, Google Developer
  • 8. Setting up PhoneGap • Install NodeJS, Git, JDK and Ant. Set PATHs. • Download files with Git • Use NodeJS Package Manager to install • Create the app on the command line • Add platforms • Run a build command • Sit back and admire your files
  • 9. The File Structure: Pre-build Root merges platforms plugins www Platform-specific files (never worked this out) Where files end up after build Extra features go here Your HTML source files live here
  • 10. The File Structure: Post-build assets: where your HTML ends up platform-specific source files platform_www: platform-specific HTML/JS platforms android ios assets PhoneGap folders platform_www Config files config files (depending on the platform)
  • 11. The Build/Test Cycle • Add platform(s) • Run build command – Generates platform-specific folder + source code – Copies from root/www to root/platforms/[platform]/assets/www • Changes made to assets/www are overwritten • Open the project in Xcode • Run it on the device or emulator
  • 12. Customising 1: Config Files • Limit screen orientation • Specify splash screen • Specify file to load: index.html • App icons Config files are different for each platform, although (in theory) generated from a single source
  • 13. Customising 2: Source Code E.g. Preventing the iOS 7 battery meter from overlapping your application • Open XCode • Tweak the Objective-C except • Next time you run build your changes will be overwritten
  • 14. Available Features Includes: • Camera • Accelerometer • Geolocation • Network connectivity • In-app purchases • Local storage
  • 15. Plug-ins Plugins are a mixture of Objective-C or Java source code and JavaScript. E.g.: • Network connectivity: – Cross-platform plug-in • In-app Purchases – Different plug-in for iOS and Android
  • 16. Plug-ins Installing a plug-in: • Use Git to download • Command line to install • Re-run build – Which may lose your customisation changes Or install by hand: • Installing a plug-in by hand is not fun
  • 17. Aside: My Code Management • Run build only once, and then customise • Set launch to index.html?platform=[platform] • platforms/[platform]/platform_www symlinked to a single app file source • Detect “platform=“ on the query string to include the correct JS plug-in config file • Include object detection in JavaScript to determine how to deliver a feature
  • 18. In-app purchases • Make sure they’re set-up correctly in iTunes Connect/Google Play • Make sure test accounts are set up • Download and install the plug-ins: – iOS: cc.fovea.plugins.inapppurchase – Android: com.smartmobilesoftware.inappbilling • Follow the documentation religiously
  • 19. Testing your code • Install the plug-in for console logging • Use simulators in Xcode • Android emulators via device manager: – GUI started from command line or from Eclipse • Test directly on plugged-in devices • Android: build and e-mail APKs • iOS: archive in Xcode, build for Ad-hoc distribution, use TestFlight
  • 20. Testing in-app purchases • Black-box systems: reports success or failure • iOS test accounts – Do not add credit card details – Test on emulators or device • Android test accounts – do not use the e-mail address on your device for developer or Wallet accounts – Have to test on live devices: no emulators
  • 21. Other gotchas • Never skim the docs • Android failed to load some folders that started with underscores • Do not try to download JavaScript in-app • For first-time setup, use test namespaces in iTunes Connect: you will mess it up • Never ever skim the docs
  • 22. Submitting Google Play • Remove debug settings • Increment version number • Build and upload • Wait 15 minutes or so
  • 23. Submitting iOS App Store • Set up certificates and provisioning • Log into iTunes Connect: – Add a new version of the app – Add any in-app purchases for this version – Mark as “Waiting for upload” • Archive in Xcode and distribute • Submit, wait and hope
  • 25. Questions PPL Tutor is free on iTunes and Google Play karl@wedugames.com twitter.com/karlbunyan