SlideShare ist ein Scribd-Unternehmen logo
1 von 112
Downloaden Sie, um offline zu lesen
Building Cordova Plugins
for iOS
Jay Garcia
1Wednesday, September 25, 13
Agenda
• Why is hybrid so important?
• Look at the anatomy of a Cordova Plugin
• Explore some examples
2Wednesday, September 25, 13
BYOD
image: http://emergingtech.tbr.edu/sites/default/files/styles/flexslider_full/public/BYOD_0.jpg?itok=W5xrH3rr
3Wednesday, September 25, 13
“The main benefit of these hybrid apps appears
to be the need for companies to support as
many operating systems as possible”
http://tabtimes.com/news/ittech-stats-research/2013/02/05/extreme-pressure-
pushing-enterprise-deploy-hybrid-mobile-apps
The BYOD Reality
4Wednesday, September 25, 13
The future is Hybrid
“While hybrid apps will be the majority of
enterprise mobile apps, web technologies like
HTML5 will make up the most commonly used
languages for building mobile applications by
2015”
-David Mitchell Smith, VP & Gartner Fellow.
5Wednesday, September 25, 13
Anatomy of a Hybrid app
• Deployed via a compiled binary
• Uses HTML5 for a portion of the UI
• Can integrate with native UI controls
• Features typically extend beyond what
HTML5 can do natively
6Wednesday, September 25, 13
Anatomy of a Cordova
Hybrid app
HTML 5
app
Custom OS
features
OS
Packager
Optional
7Wednesday, September 25, 13
Supporting Multiple
Platforms with Cordova
Custom OS
features
OS Packager
iOS
Custom OS
features
OS Packager
WP8
Custom OS
features
OS Packager
Android
Custom OS
features
OS Packager
BBOS
HTML 5 app
8Wednesday, September 25, 13
An example plugin
9Wednesday, September 25, 13
An example plugin
Random
Number
9Wednesday, September 25, 13
An example plugin
Random
Number
Random
Number
Plugin
creates this file
9Wednesday, September 25, 13
Demo
Random
Number
10Wednesday, September 25, 13
11Wednesday, September 25, 13
The Cordova Plugin dev
process
12Wednesday, September 25, 13
Configure
Plugin
#1
The Cordova Plugin dev
process
12Wednesday, September 25, 13
Write ObjC
Classes
#2
Configure
Plugin
#1
The Cordova Plugin dev
process
12Wednesday, September 25, 13
Write ObjC
Classes
#2
Configure
Plugin
#1
The Cordova Plugin dev
process
Write teh
codez!
#3
12Wednesday, September 25, 13
Step #1:
Configure Cordova to
use the plugin
13Wednesday, September 25, 13
Edit config.xml
14Wednesday, September 25, 13
Edit config.xml
14Wednesday, September 25, 13
Edit config.xml
14Wednesday, September 25, 13
Step #2:
Create your Cordova
Classes
15Wednesday, September 25, 13
Create ObjC files
16Wednesday, September 25, 13
Create ObjC files
16Wednesday, September 25, 13
Create ObjC files
17Wednesday, September 25, 13
Create ObjC files
17Wednesday, September 25, 13
Create ObjC files
17Wednesday, September 25, 13
Create ObjC files
17Wednesday, September 25, 13
Step #3:
Write the code!
18Wednesday, September 25, 13
JavaScript to ObjC Bridge
{ JavaScript }
19Wednesday, September 25, 13
Executing Cordova plugin methods
(The Pattern)
20Wednesday, September 25, 13
Executing Cordova plugin methods
(The Pattern)
20Wednesday, September 25, 13
Executing Cordova plugin methods
(The Pattern)
20Wednesday, September 25, 13
Executing Cordova plugin methods
(The Pattern)
20Wednesday, September 25, 13
Executing Cordova plugin methods
(The Pattern)
20Wednesday, September 25, 13
Executing Cordova plugin methods
(The Pattern)
20Wednesday, September 25, 13
Initiating the “set” workflow
21Wednesday, September 25, 13
Initiating the “set” workflow
21Wednesday, September 25, 13
Initiating the “set” workflow
21Wednesday, September 25, 13
Initiating the “set” workflow
21Wednesday, September 25, 13
Initiating the “set” workflow
21Wednesday, September 25, 13
Initiating the “set” workflow
21Wednesday, September 25, 13
Initiating the “set” workflow
21Wednesday, September 25, 13
Initiating the “set” workflow
21Wednesday, September 25, 13
The “set” workflow
22Wednesday, September 25, 13
The “set” workflow
22Wednesday, September 25, 13
The “set” workflow
22Wednesday, September 25, 13
The “set” workflow
23Wednesday, September 25, 13
The “set” workflow
23Wednesday, September 25, 13
The “set” workflow
23Wednesday, September 25, 13
The “set” workflow
23Wednesday, September 25, 13
The “set” workflow
24Wednesday, September 25, 13
The “set” workflow
24Wednesday, September 25, 13
The “set” workflow
24Wednesday, September 25, 13
The “set” workflow
24Wednesday, September 25, 13
Initiating the “get” workflow
25Wednesday, September 25, 13
Initiating the “get” workflow
25Wednesday, September 25, 13
Initiating the “get” workflow
25Wednesday, September 25, 13
Initiating the “get” workflow
25Wednesday, September 25, 13
Initiating the “get” workflow
25Wednesday, September 25, 13
Initiating the “get” workflow
25Wednesday, September 25, 13
The “get” workflow
26Wednesday, September 25, 13
The “get” workflow
26Wednesday, September 25, 13
The “get” workflow
27Wednesday, September 25, 13
The “get” workflow
27Wednesday, September 25, 13
The “get” workflow
27Wednesday, September 25, 13
The “get” workflow
27Wednesday, September 25, 13
The “get” workflow
27Wednesday, September 25, 13
The “get” workflow
28Wednesday, September 25, 13
The “get” workflow
28Wednesday, September 25, 13
The “get” workflow
28Wednesday, September 25, 13
The “get” workflow
28Wednesday, September 25, 13
The “get” workflow
28Wednesday, September 25, 13
The “get” workflow
28Wednesday, September 25, 13
It works!
29Wednesday, September 25, 13
It works!
29Wednesday, September 25, 13
So...What else can we
do?
30Wednesday, September 25, 13
Custom audio FFT data renderer
31Wednesday, September 25, 13
Custom audio FFT data renderer
31Wednesday, September 25, 13
Custom audio FFT data renderer
31Wednesday, September 25, 13
Custom audio FFT data renderer
31Wednesday, September 25, 13
Demo
32Wednesday, September 25, 13
• Amiga Mod music Player
• Touch 2.2.1 UI
• Driven by custom PhoneGap plugin
- C++ Library wrapped with ObjC
• Renders FFT audio data
• Custom Canvas touch component
- Three different modes
• Really fast!!
- 20ms return cycle
App Details
33Wednesday, September 25, 13
The Stack
{ JavaScript }
34Wednesday, September 25, 13
The Stack
{ JavaScript }
34Wednesday, September 25, 13
Get raw Data (JavaScript)
35Wednesday, September 25, 13
Get raw Data (JavaScript)
Update data
on View
35Wednesday, September 25, 13
Get raw Data (JavaScript)
35Wednesday, September 25, 13
Get statistic Data (ObjC)
36Wednesday, September 25, 13
Get statistic Data (ObjC)
36Wednesday, September 25, 13
Get statistic Data (ObjC)
36Wednesday, September 25, 13
Get statistic Data (ObjC)
36Wednesday, September 25, 13
Get statistic Data (ObjC)
36Wednesday, September 25, 13
Get statistic Data (ObjC)
36Wednesday, September 25, 13
Get FFT Data (ObjC)
37Wednesday, September 25, 13
Get FFT Data (ObjC)
37Wednesday, September 25, 13
Get Spectrum FFT Data (ObjC)
38Wednesday, September 25, 13
Get Spectrum FFT Data (ObjC)
38Wednesday, September 25, 13
Get Spectrum FFT Data (ObjC)
38Wednesday, September 25, 13
Get Spectrum FFT Data (ObjC)
38Wednesday, September 25, 13
Get FFT Data (ObjC)
39Wednesday, September 25, 13
Get FFT Data (ObjC)
39Wednesday, September 25, 13
Get FFT Data (ObjC)
39Wednesday, September 25, 13
Render FFT Data
40Wednesday, September 25, 13
Render FFT Data
Clear canvas
40Wednesday, September 25, 13
Render FFT Data
40Wednesday, September 25, 13
Render FFT Data
Update
canvas
40Wednesday, September 25, 13
Render FFT Data
40Wednesday, September 25, 13
It works!
41Wednesday, September 25, 13
Wrapping up
• BYOD pushing hybrid apps
• Hybrid is AWESOME
• Extends the capabilities of your web apps
42Wednesday, September 25, 13
Resources
• Objective C
• http://cocoadevcentral.com/d/learn_objectivec/
• http://mobile.tutsplus.com/tutorials/iphone/learn-
objective-c-day-1/
• Cordova:
• http://bit.ly/cdv_plugin_dev_guide
• http://bit.ly/cdv_plugin_spec
43Wednesday, September 25, 13
Questions?
Jay Garcia
• @ModusCreate || @ModusJesus
• moduscreate.com
• https://github.com/ModusCreateOrg/custom-cordova-plugin-blog
• https://github.com/ModusCreateOrg/ModusModPlayer
44Wednesday, September 25, 13

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (20)

Practices and obstacles in agile development
Practices and obstacles in agile developmentPractices and obstacles in agile development
Practices and obstacles in agile development
 
ModUX keynote
ModUX keynoteModUX keynote
ModUX keynote
 
High Performance Web Sites - 2008
High Performance Web Sites - 2008High Performance Web Sites - 2008
High Performance Web Sites - 2008
 
Securing Client Side Data
 Securing Client Side Data Securing Client Side Data
Securing Client Side Data
 
Exploring the Possibilities of Sencha and WebRTC
Exploring the Possibilities of Sencha and WebRTCExploring the Possibilities of Sencha and WebRTC
Exploring the Possibilities of Sencha and WebRTC
 
AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UX
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UX
 
Google’s PRPL Web development pattern
Google’s PRPL Web development patternGoogle’s PRPL Web development pattern
Google’s PRPL Web development pattern
 
Webpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ StepsWebpack & React Performance in 16+ Steps
Webpack & React Performance in 16+ Steps
 
PRPL Pattern with Webpack and React
PRPL Pattern with Webpack and ReactPRPL Pattern with Webpack and React
PRPL Pattern with Webpack and React
 
Frustration-Free Packaging of Ext JS 5 Applications
Frustration-Free Packaging of Ext JS 5 ApplicationsFrustration-Free Packaging of Ext JS 5 Applications
Frustration-Free Packaging of Ext JS 5 Applications
 
Back to the Future with ES.next
Back to the Future with ES.nextBack to the Future with ES.next
Back to the Future with ES.next
 
Measuring Web Performance
Measuring Web Performance Measuring Web Performance
Measuring Web Performance
 
Technology stack behind Airbnb
Technology stack behind Airbnb Technology stack behind Airbnb
Technology stack behind Airbnb
 
Responsive Images and Performance
Responsive Images and PerformanceResponsive Images and Performance
Responsive Images and Performance
 
La Web Salta al Mundo Físico - Web meets Physical World (spanish)
La Web Salta al Mundo Físico - Web meets Physical World (spanish)La Web Salta al Mundo Físico - Web meets Physical World (spanish)
La Web Salta al Mundo Físico - Web meets Physical World (spanish)
 
Extreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYExtreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NY
 
Extreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile Devices Extreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile Devices
 
Extreme Web Performance for Mobile Device Fluent 2015
Extreme Web Performance for Mobile Device Fluent 2015Extreme Web Performance for Mobile Device Fluent 2015
Extreme Web Performance for Mobile Device Fluent 2015
 
Progressive Web Apps (español - spanish)
Progressive Web Apps (español - spanish)Progressive Web Apps (español - spanish)
Progressive Web Apps (español - spanish)
 

Ähnlich wie Building Cordova plugins for iOS

Symfony - Introduction
Symfony - IntroductionSymfony - Introduction
Symfony - Introduction
Piers Warmers
 
Cal Summit Small
Cal Summit SmallCal Summit Small
Cal Summit Small
mclee
 
Butter Web Browsing with Margarine
Butter Web Browsing with MargarineButter Web Browsing with Margarine
Butter Web Browsing with Margarine
Wayne Walls
 
Slides changes symfony23
Slides changes symfony23Slides changes symfony23
Slides changes symfony23
Javier López
 

Ähnlich wie Building Cordova plugins for iOS (20)

HTML5 for mobile development
HTML5 for mobile developmentHTML5 for mobile development
HTML5 for mobile development
 
BigML Webcast: September 25, 2013
BigML Webcast:  September 25, 2013BigML Webcast:  September 25, 2013
BigML Webcast: September 25, 2013
 
Augmented Reality in JavaScript
Augmented Reality in JavaScriptAugmented Reality in JavaScript
Augmented Reality in JavaScript
 
Symfony - Introduction
Symfony - IntroductionSymfony - Introduction
Symfony - Introduction
 
Culture Accommodating to Physical Space
Culture Accommodating to Physical SpaceCulture Accommodating to Physical Space
Culture Accommodating to Physical Space
 
100% JS
100% JS100% JS
100% JS
 
Culture Accommodating to Physical Space
Culture Accommodating to Physical SpaceCulture Accommodating to Physical Space
Culture Accommodating to Physical Space
 
Unit and functional testing with Siesta
Unit and functional testing with SiestaUnit and functional testing with Siesta
Unit and functional testing with Siesta
 
How to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David BonillaHow to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David Bonilla
 
Angrybirds - Overview for a High Performance Shop
Angrybirds - Overview for a High Performance ShopAngrybirds - Overview for a High Performance Shop
Angrybirds - Overview for a High Performance Shop
 
Cal Summit Small
Cal Summit SmallCal Summit Small
Cal Summit Small
 
RabbitMQ Hands On
RabbitMQ Hands OnRabbitMQ Hands On
RabbitMQ Hands On
 
Intro to axure
Intro to axureIntro to axure
Intro to axure
 
Butter Web Browsing with Margarine
Butter Web Browsing with MargarineButter Web Browsing with Margarine
Butter Web Browsing with Margarine
 
Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014
 
Slides changes symfony23
Slides changes symfony23Slides changes symfony23
Slides changes symfony23
 
Introduction to Scrum version 3.1
Introduction to Scrum version 3.1Introduction to Scrum version 3.1
Introduction to Scrum version 3.1
 
Provisioning profiles like a Pro
Provisioning profiles like a ProProvisioning profiles like a Pro
Provisioning profiles like a Pro
 
Mapbox Training ICCM 2013
Mapbox Training ICCM 2013Mapbox Training ICCM 2013
Mapbox Training ICCM 2013
 
And the Greatest of These Is ... Space
And the Greatest of These Is ... SpaceAnd the Greatest of These Is ... Space
And the Greatest of These Is ... Space
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Building Cordova plugins for iOS