SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante a 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
 

Semelhante a 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
 

Mais de 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
 

Mais de 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
 

Último

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Último (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

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