SlideShare a Scribd company logo
Native Javascript apps with
                                                      Phonegap

                                                    Martin de Keijzer
                      iOSOnRailsConf2013 13-14 April, Alushta Ukraine




Sunday, 14 April 13
Introduction




                                     2

Sunday, 14 April 13
About me

             Martin de Keijzer
             Dutch web developer


                      Working for Ibuildings


                      PHPBenelux Board Member


                      @Martin1982

                      http://www.martindekeijzer.nl
                                                      3

Sunday, 14 April 13
What is PhoneGap?
                      Subtitel




                                          4

Sunday, 14 April 13
What is PhoneGap




                      A way to wrap you HTML
                      app as a native application.
                                                     5

Sunday, 14 April 13
What is PhoneGap
   A way to bridge ‘Native’ functionality to a Javascript API




                                                            6

Sunday, 14 April 13
Mission




                         PhoneGap’s mission is for
                      PhoneGap to cease to exist!




                                                     7

Sunday, 14 April 13
Cordova, PhoneGap
                      WTF?!?!?




                                          8

Sunday, 14 April 13
PhoneGap Pre-Adobe




                                by




                                     9

Sunday, 14 April 13
PhoneGap acquisistion by Adobe




                                       Donated to
 Acquired by




                                                    10

Sunday, 14 April 13
Acquisition by Adobe




                 “PhoneGap”       “Callback”
                                  “Cordova”
                                               11

Sunday, 14 April 13
PhoneGap now




                      Where changes get committed




                                                    12

Sunday, 14 April 13
PhoneGap now




                          PhoneGap releases, still identical to
                                 Apache Cordova




                                                                  13

Sunday, 14 April 13
In conclusion




                           You’ll use PhoneGap!


                                                  14

Sunday, 14 April 13
Installing PhoneGap
                      Getting ready for lift-off




                                                   15

Sunday, 14 April 13
Getting PhoneGap




                      http://phonegap.com/download/

                                                      16

Sunday, 14 April 13
Lib is where the magic lives




                                     “lib” contains all supported
                                           platforms.... and a

                                          ♥♥♥♥   CLI tool ♥ ♥ ♥ ♥




                                                                    17

Sunday, 14 April 13
XCode Command Line Tools




                                      18

Sunday, 14 April 13
Creating your first project

              $ ./path/to/cordova-ios/bin/create

              /path/to/my_new_cordova_project

              com.example.cordova_project_name

              CordovaProjectName




                                                   19

Sunday, 14 April 13
Creating your first project




                               XCode Project

                                               20

Sunday, 14 April 13
The app




                      21

Sunday, 14 April 13
First Run




                       22

Sunday, 14 April 13
Ready for action




     Always use the “www” folder & always assume your
    app is running from a filesystem instead of a web server!




                                                          23

Sunday, 14 April 13
PhoneGap build
                      Let’s take it easy




                                           24

Sunday, 14 April 13
Creating builds using XCode




                                 The pain:
              Running updates and checking requirements over
                              and over again!




                                                               25

Sunday, 14 April 13
Creating builds using XCode




                                         26

Sunday, 14 April 13
PhoneGap build to the rescue!




                       http://build.phonegap.com
                                                   27

Sunday, 14 April 13
PhoneGap build in a nutshell




                                          28

Sunday, 14 April 13
Getting started




                             OR




                                  29

Sunday, 14 April 13
Getting started




                             30

Sunday, 14 April 13
Getting started




                              OR




     Repository that represents    Zip-file that represents
              “www”                        “www”           31

Sunday, 14 April 13
Getting started




                             32

Sunday, 14 April 13
The power of PhoneGap Build



          Title                          Metadata   Test




           Code
                                                           33

Sunday, 14 April 13
Build statusses




                      Grey: Still building, be patient
                      Blue-ish: Build succeeded, click to download
                      Red: Build error, action required
                                                                     34

Sunday, 14 April 13
Build errors




                          35

Sunday, 14 April 13
Working in teams




                              36

Sunday, 14 April 13
Building like a pro




                                   config.xml
                              W3C Widget Specification

                      https://gist.github.com/Martin1982/5063962
                                                                   37

Sunday, 14 April 13
Plug-ins
                      When the web just doesn’t suffice




                                                          38

Sunday, 14 April 13
Accelerometer




                           Get device movement
                            in an X,Y, Z space.




                                                  39

Sunday, 14 April 13
Camera & Capture & Media



                                                   Use the device’s library,
                                                 camera and microphone to
                                                 work with local audio, video
                                                        and images.



                      Don’t forget iOS 6 supports:
                      <input type="file" accept="image/*" capture="camera">

                                                                              40

Sunday, 14 April 13
Compass




                      API to detect which way a
                       device user is pointing




                                                  41

Sunday, 14 April 13
Connection




                         See if a user is connected and
                        inspect the type of connection:

                              Wifi, xG, Ethernet



      Caution navigator.isOnline is your close friend
                                                          42

Sunday, 14 April 13
Contacts




                      Access the user’s contact list




                                                       43

Sunday, 14 April 13
Device




                      •Name
                      •Cordova version
                      •Platform
                      •UUID
                      •Version
                      •Model


                                         44

Sunday, 14 April 13
Events




                      Handles application state
                      (deviceready, paused etc)




                                                  45

Sunday, 14 April 13
File




                      Filesystem bridging, based
                         on the W3C File API




                                             46

Sunday, 14 April 13
Geolocation



                                      API to get the latitudes and
                                       longitudes of the device.


                      Caution: Already supported by browsers!




                                                                     47

Sunday, 14 April 13
Globalization




                           Currency, language, date time




                                                           48

Sunday, 14 April 13
InAppBrowser




                          The browser opened by
                            window.open()




                                             49

Sunday, 14 April 13
Notification




                          •Alert
                          •Confirmation
                          •Beep
                          •Vibrate



                                         50

Sunday, 14 April 13
Splashscreen




                      No matter how beautiful your splash screen is,
                       eventually you’ll need to show and hide it
                                                                       51

Sunday, 14 April 13
Storage




                            SQL storage based on the W3C
                               WebSQL specification.




             Caution; WebSQL is no longer maintained
                    IndexedDB is the new superhero!
                                                      52

Sunday, 14 April 13
User plugins
                      Why reinvent the wheel




                                               53

Sunday, 14 April 13
Pick what you want




                      https://github.com/phonegap/phonegap-plugins   54

Sunday, 14 April 13
QUESTIONS



                                  55

Sunday, 14 April 13
Thank you for listening

                                  mdkeijzer@ibuildings.nl
                                            @Martin1982




Sunday, 14 April 13

More Related Content

PDF
Native-Javascript Bridging Using WKWebViews in iOS8
PDF
Native Javascript apps with PhoneGap
PDF
Hybrid Mobile Web Apps with Sencha Touch 2
PDF
Structuring apps in Scala
PDF
Future layouts
PDF
Hack your phone! / User freedom in a mobile-centric world
PDF
Android meetup
PDF
Hybrid Mobile Web Apps with Sencha Touch 2
Native-Javascript Bridging Using WKWebViews in iOS8
Native Javascript apps with PhoneGap
Hybrid Mobile Web Apps with Sencha Touch 2
Structuring apps in Scala
Future layouts
Hack your phone! / User freedom in a mobile-centric world
Android meetup
Hybrid Mobile Web Apps with Sencha Touch 2

Similar to Native Javascript apps with PhoneGap (18)

PDF
Reggefiber glasvezel presentatie
PDF
Native Javascript apps with PhoneGap by Martin de Keijzer
PDF
From HTML5 to Hardware - Simonyi Conference Budapest April 15
PDF
Screencasting in the classroom
PDF
Test Driven Infrastructure Development
PDF
Test driven infrastructure development
PDF
Porting Tips: iOS to Android
PDF
Unit Testing
PDF
Workshop de Desarrollo con Cascades Blackberry Dev Meeting Santiago
PDF
Making meaning with mobile apps
PDF
Soflophp 2013 - SysAdmin skills for PHP developers
PDF
Secret sauce of building php applications
PPTX
To succeed in IT Industry...
ODP
Introduction to PhoneGap
ODP
Introduction to PhoneGap
ODP
Phonegap
PDF
Introduction to Node.js
PDF
Spring in-the-cloud
Reggefiber glasvezel presentatie
Native Javascript apps with PhoneGap by Martin de Keijzer
From HTML5 to Hardware - Simonyi Conference Budapest April 15
Screencasting in the classroom
Test Driven Infrastructure Development
Test driven infrastructure development
Porting Tips: iOS to Android
Unit Testing
Workshop de Desarrollo con Cascades Blackberry Dev Meeting Santiago
Making meaning with mobile apps
Soflophp 2013 - SysAdmin skills for PHP developers
Secret sauce of building php applications
To succeed in IT Industry...
Introduction to PhoneGap
Introduction to PhoneGap
Phonegap
Introduction to Node.js
Spring in-the-cloud
Ad

More from Martin de Keijzer (18)

PDF
High quality live broadcasting with PHP 27 07-2016
PDF
Productive & easy mobile app dev
PDF
tiCONF Amsterdam 2014 building mobile teams
PDF
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
PDF
The Environment Restaurant
PDF
Introduction to PhoneGap and PhoneGap Build
PDF
Mobile is everywhere
KEY
2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OS
KEY
2012 09-04 smart devcon - sencha touch 2
KEY
2012 09-04 smart devcon - boot to the web, boot 2 gecko
PDF
Sencha Touch 2
PDF
Sencha Touch 2
PDF
Let's take over the world with Zend Framework
KEY
Improving code quality with continuous integration (PHPBenelux Conference 2011)
ODP
Improving code quality using CI
PDF
Continuous integration why and how? [DPC uncon quick-prep version]
ODP
Subversion In De Praktijk
ODP
Een introductie voor Phpunit
High quality live broadcasting with PHP 27 07-2016
Productive & easy mobile app dev
tiCONF Amsterdam 2014 building mobile teams
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
The Environment Restaurant
Introduction to PhoneGap and PhoneGap Build
Mobile is everywhere
2012 11-01 Hackers & founders - Boot to the web, boot 2 gecko / Firefox OS
2012 09-04 smart devcon - sencha touch 2
2012 09-04 smart devcon - boot to the web, boot 2 gecko
Sencha Touch 2
Sencha Touch 2
Let's take over the world with Zend Framework
Improving code quality with continuous integration (PHPBenelux Conference 2011)
Improving code quality using CI
Continuous integration why and how? [DPC uncon quick-prep version]
Subversion In De Praktijk
Een introductie voor Phpunit
Ad

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation_ Review paper, used for researhc scholars
Assigned Numbers - 2025 - Bluetooth® Document
Network Security Unit 5.pdf for BCA BBA.
NewMind AI Weekly Chronicles - August'25-Week II
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx
A comparative analysis of optical character recognition models for extracting...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
The Rise and Fall of 3GPP – Time for a Sabbatical?

Native Javascript apps with PhoneGap

  • 1. Native Javascript apps with Phonegap Martin de Keijzer iOSOnRailsConf2013 13-14 April, Alushta Ukraine Sunday, 14 April 13
  • 2. Introduction 2 Sunday, 14 April 13
  • 3. About me Martin de Keijzer Dutch web developer Working for Ibuildings PHPBenelux Board Member @Martin1982 http://www.martindekeijzer.nl 3 Sunday, 14 April 13
  • 4. What is PhoneGap? Subtitel 4 Sunday, 14 April 13
  • 5. What is PhoneGap A way to wrap you HTML app as a native application. 5 Sunday, 14 April 13
  • 6. What is PhoneGap A way to bridge ‘Native’ functionality to a Javascript API 6 Sunday, 14 April 13
  • 7. Mission PhoneGap’s mission is for PhoneGap to cease to exist! 7 Sunday, 14 April 13
  • 8. Cordova, PhoneGap WTF?!?!? 8 Sunday, 14 April 13
  • 9. PhoneGap Pre-Adobe by 9 Sunday, 14 April 13
  • 10. PhoneGap acquisistion by Adobe Donated to Acquired by 10 Sunday, 14 April 13
  • 11. Acquisition by Adobe “PhoneGap” “Callback” “Cordova” 11 Sunday, 14 April 13
  • 12. PhoneGap now Where changes get committed 12 Sunday, 14 April 13
  • 13. PhoneGap now PhoneGap releases, still identical to Apache Cordova 13 Sunday, 14 April 13
  • 14. In conclusion You’ll use PhoneGap! 14 Sunday, 14 April 13
  • 15. Installing PhoneGap Getting ready for lift-off 15 Sunday, 14 April 13
  • 16. Getting PhoneGap http://phonegap.com/download/ 16 Sunday, 14 April 13
  • 17. Lib is where the magic lives “lib” contains all supported platforms.... and a ♥♥♥♥ CLI tool ♥ ♥ ♥ ♥ 17 Sunday, 14 April 13
  • 18. XCode Command Line Tools 18 Sunday, 14 April 13
  • 19. Creating your first project $ ./path/to/cordova-ios/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName 19 Sunday, 14 April 13
  • 20. Creating your first project XCode Project 20 Sunday, 14 April 13
  • 21. The app 21 Sunday, 14 April 13
  • 22. First Run 22 Sunday, 14 April 13
  • 23. Ready for action Always use the “www” folder & always assume your app is running from a filesystem instead of a web server! 23 Sunday, 14 April 13
  • 24. PhoneGap build Let’s take it easy 24 Sunday, 14 April 13
  • 25. Creating builds using XCode The pain: Running updates and checking requirements over and over again! 25 Sunday, 14 April 13
  • 26. Creating builds using XCode 26 Sunday, 14 April 13
  • 27. PhoneGap build to the rescue! http://build.phonegap.com 27 Sunday, 14 April 13
  • 28. PhoneGap build in a nutshell 28 Sunday, 14 April 13
  • 29. Getting started OR 29 Sunday, 14 April 13
  • 30. Getting started 30 Sunday, 14 April 13
  • 31. Getting started OR Repository that represents Zip-file that represents “www” “www” 31 Sunday, 14 April 13
  • 32. Getting started 32 Sunday, 14 April 13
  • 33. The power of PhoneGap Build Title Metadata Test Code 33 Sunday, 14 April 13
  • 34. Build statusses Grey: Still building, be patient Blue-ish: Build succeeded, click to download Red: Build error, action required 34 Sunday, 14 April 13
  • 35. Build errors 35 Sunday, 14 April 13
  • 36. Working in teams 36 Sunday, 14 April 13
  • 37. Building like a pro config.xml W3C Widget Specification https://gist.github.com/Martin1982/5063962 37 Sunday, 14 April 13
  • 38. Plug-ins When the web just doesn’t suffice 38 Sunday, 14 April 13
  • 39. Accelerometer Get device movement in an X,Y, Z space. 39 Sunday, 14 April 13
  • 40. Camera & Capture & Media Use the device’s library, camera and microphone to work with local audio, video and images. Don’t forget iOS 6 supports: <input type="file" accept="image/*" capture="camera"> 40 Sunday, 14 April 13
  • 41. Compass API to detect which way a device user is pointing 41 Sunday, 14 April 13
  • 42. Connection See if a user is connected and inspect the type of connection: Wifi, xG, Ethernet Caution navigator.isOnline is your close friend 42 Sunday, 14 April 13
  • 43. Contacts Access the user’s contact list 43 Sunday, 14 April 13
  • 44. Device •Name •Cordova version •Platform •UUID •Version •Model 44 Sunday, 14 April 13
  • 45. Events Handles application state (deviceready, paused etc) 45 Sunday, 14 April 13
  • 46. File Filesystem bridging, based on the W3C File API 46 Sunday, 14 April 13
  • 47. Geolocation API to get the latitudes and longitudes of the device. Caution: Already supported by browsers! 47 Sunday, 14 April 13
  • 48. Globalization Currency, language, date time 48 Sunday, 14 April 13
  • 49. InAppBrowser The browser opened by window.open() 49 Sunday, 14 April 13
  • 50. Notification •Alert •Confirmation •Beep •Vibrate 50 Sunday, 14 April 13
  • 51. Splashscreen No matter how beautiful your splash screen is, eventually you’ll need to show and hide it 51 Sunday, 14 April 13
  • 52. Storage SQL storage based on the W3C WebSQL specification. Caution; WebSQL is no longer maintained IndexedDB is the new superhero! 52 Sunday, 14 April 13
  • 53. User plugins Why reinvent the wheel 53 Sunday, 14 April 13
  • 54. Pick what you want https://github.com/phonegap/phonegap-plugins 54 Sunday, 14 April 13
  • 55. QUESTIONS 55 Sunday, 14 April 13
  • 56. Thank you for listening mdkeijzer@ibuildings.nl @Martin1982 Sunday, 14 April 13