SlideShare a Scribd company logo
1 of 37
Download to read offline
Top Cordova Challenges
And How To Tackle Them
March 2019
Today’s Speakers
Matt Netkow Senior Product Evangelist
Bryant Plano Solutions Consultant
Today’s Agenda
Intro: What is a Hybrid App? Cordova? Ionic?
Tips for Addressing Top Cordova Challenges
1. Dependency Management
2. Build Failures
3. Native Bugs & Missing Features
4. Finding the Right Plugin
Live Demo
What is a Hybrid App?
HTML, CSS, JavaScript
Runs in a “browser” WebView
Wrapped in native app shell
Access device capabilities via plugins
A native app!
Cordova/
PhoneGap
Ionic Framework
Mobile-ready UI library that works everywhere:
any platform, any device, any framework.
➔ Build for iOS, Android, Electron, PWAs, Web
➔ One codebase across all platforms
➔ Use basic web skills: HTML, JS, CSS
➔ Full access to Native APIs and Plugins
#1 Dependency Management
Project Dependencies
Incompatibilities may exist between each
layer of the stack:
- Web Framework (Angular, Vue, React)
- 3rd Party JavaScript Libraries
- Ionic
- Cordova Platforms
- Cordova Plugins (and Ionic Native)
What We’ll Cover
1. JavaScript Libraries
2. Version Management
3. Cordova & Ionic Native Dependencies
4. Angular
5. Ionic CLI
6. Ionic Framework
JavaScript Libraries
"dependencies": {
"@angular/common": "^7.2.2",
"@angular/router": "^7.2.2",
"@ionic-native/camera": "^5.2.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^4.1.0",
"cordova-android": "7.1.4",
"cordova-ios": "5.0.0",
"cordova-plugin-camera": "^4.0.3"
},
package.json package.lock.json
"dependencies": {
"@angular-devkit/architect": {
"version": "0.11.4",
"resolved":
"https://registry.npmjs.org/@angular-devkit/ar
chitect/-/architect-0.11.4.tgz",
"integrity":
"sha512-2zi6S9tPlk52vyqN67IvFoeNgd0uxtrPlwl
3TdvJ3wrH7sYGJnkQ+EzAE7cKUGWAV989BbNtx
2YxhRDHnN21Fg==",
"dev": true,
"requires": {
"@angular-devkit/core": "7.1.4",
"rxjs": "6.3.3"
}
‘npm install’ Defaults to Minor Version
* (asterisk): Latest major version - *x.x.x (aka wildcard, “Wild West”)
^ (carat): Latest minor version: ^1.x.x (Somewhat restrictive)
~ (tilde): Latest patch version: ~1.1.x (Bug fixes only)
(none): Exact version: 1.1.3 (Most locked down)
Tips for Version Management
Lock Version Explicitly Lock to Patch Version Add .npmrc File
1 2 3
Cordova Dependencies
Platforms
package.json - JavaScript
"cordova-ios": "5.0.0",
"cordova-android": "7.1.4",
config.xml - Native
<engine name="ios" spec="5.0.0" />
<engine name="android" spec="7.1.4" />
<platform name="android" />
<platform name="ios" />
Plugins
package.json - JavaScript
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "2.4.2",
config.xml - Native
<plugin name="cordova-plugin-splashscreen"
spec="5.0.2" />
<plugin name="cordova-plugin-statusbar"
spec="2.4.2" />
Tips for Cordova Management
1. Use the CLI instead of directly editing config.xml and package.json
a. ionic cordova [command] - better experience w/additional
functionality
2. Upgrade safely: Remove, then re-add plugin.
a. ionic cordova plugin remove cordova-plugin-camera
b. ionic cordova plugin add cordova-plugin-camera
3. Use explicit versions: ionic cordova plugin add
cordova-plugin-camera@4.3.2
Tips for Cordova Management
5. Restore platforms and plugins
a. ionic cordova prepare restores platforms and plugins from
package.json and config.xml
b. Version to install is taken from package.json or config.xml, if found
c. In case of conflicts, package.json is given precedence over config.xml
6. Use Ionic CLI commands
a. ionic doctor: Detects common issues and suggests steps to fix them
b. ionic repair: Remove, regenerate all dependencies
Ionic Native Dependencies
Ionic Native: TypeScript “Wrappers” around Cordova plugins
https://ionicframework.com/docs/native
1. Review Cordova GitHub page for Issues, Releases
a. Example: https://github.com/apache/cordova-plugin-camera
2. Update to latest of both Ionic Native and Cordova plugins if possible
3. Review Release Notes
a. See https://github.com/ionic-team/ionic-native/releases
4. Cordova Plugins: If not using Releases tab, then check
Angular Dependencies
ng update
Update Tool
https://update.angular.io
Ionic CLI
Ionic CLI is NOT Ionic Framework
1. Update CLI:
a. npm install -g ionic
2. Update Framework (aka your Ionic project):
a. npm install @ionic/angular@latest
Ionic version numbers do not match across the board (ionic info):
1. Ionic CLI: 4.12.0
2. Ionic Framework (@ionic/angular): 4.1.2
3. Ionic Native (@ionic-native/core): ^5.2.0
Ionic Framework
1. Ionic 4: @ionic/angular, @ionic/vue, @ionic/react
2. Ionic 3: ionic-angular
Dependency Strategy: Small Changes
Go one step at a time
- Why? Reduce the surface area for issues to arise
- Separate branches, one for each layer of the stack
- Ionic
- Cordova Platforms
- Cordova Plugins (and Ionic Native)
- Web Framework (Angular, Vue, React)
- Additional 3rd Party JavaScript Libraries
Test, test, test!
Dependency Strategy: Update Often
The most stable apps are routinely updated, especially at the native layer
- Security fixes
- New Features
- Improved performance
When should I update?
- Research: Official blogs and news
- Nature of the update: Shiny new feature or critical security fix?
- Timing: Where does it fit in against Team/Project goals?
#2 Conflicts & Build Failures
Who’s the Culprit?
Plugins conflict with each other when they share underlying native dependencies
- More than one plugin trying to access the same native code
- Example: Google Play Services version
- Google Maps: GPS v24.2 but Firebase wants GPS v27.1 and Google Auth wants...
Tip: Ensure using only one plugin per specific feature/functionality
- Example: Push Notifications
Cordova Plugin Conflicts
Research the build error(s) by checking out these resources:
1. Ionic Customer Success Knowledge base: https://ionic.zendesk.com
2. Google & StackOverflow: Many errors are documented online
3. Ionic Forum: https://forum.ionicframework.com (Ionic Native category)
4. Ionic Worldwide Slack: https://ionicworldwide.herokuapp.com
Troubleshooting Failed Builds
Demo Time!
#3 Bugs & Feature Requests
Plugins are open source, but… they’re built with native code
What can you do?
1. File an issue on GitHub, contact the maintainer directly
2. Hire native developers
3. Contract out (agencies, contractors, consultancies)
Ionic has a solution for this...
How to Update/Fix OSS Plugins?
#4 Finding the Right Plugin
Use the Web Platform when possible: https://whatwebcando.today/
Do You Need One?
Start with Ionic Native
● OSS Cordova plugins wrapped in TypeScript
● See library at https://ionicframework.com/docs/native
Search the OSS community
● Core plugins are named “cordova-plugin-X” under Apache GitHub repo
● Look for official plugins, backed by a company
○ Review maintenance record
○ Recent, consistent commits?
○ When was the last release?
○ High issue count may be a concern, may not be
Tips for Picking a Plugin
Ionic Solutions for Teams
Capacitor: Cordova, Reimagined
Feature Cordova Capacitor
Supported Platforms iOS, Android, Windows
Phone
iOS, Android, Desktop
(Windows, Mac, Linux), Web,
PWA, and beyond!
Configuration style Abstracted (Config.xml) Per-platform (Info.plist,
AndroidManifest.xml)
Native platform control Limited Full control
Production ready? Yes, stable Soon
https://capacitor.ionicframework.comhttps://ion.link/capacitor-yt
Ionic Enterprise Edition
Native Bridge
Easy access to native device features and third-party
apps.
➔ Core library of native device functionality
➔ Integrations with popular third-party apps
➔ Proactive security and maintenance updates
➔ Support SLA backed by Ionic
Reality of OSS Cordova Development
Multiple plugin APIs
Multiple points of failure
Multiple maintainers
No support SLA
Enterprise Edition: One API, Any Connection
One plugin API
Fully maintained by Ionic
Easy access to device features
Pre-built & custom integrations
Works across mobile, desktop, PWA
</presentation>
Questions?

More Related Content

What's hot

Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkCihad Horuzoğlu
 
Hybrid app in ionic framework overview
Hybrid app in ionic framework overviewHybrid app in ionic framework overview
Hybrid app in ionic framework overviewSanket Devlekar
 
Build Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic FrameworkBuild Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic FrameworkSalesforce Developers
 
Intro to mobile apps with the ionic framework & angular js
Intro to mobile apps with the ionic framework & angular jsIntro to mobile apps with the ionic framework & angular js
Intro to mobile apps with the ionic framework & angular jsHector Iribarne
 
IONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentIONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentMalan Amarasinghe
 
Getting started with the Ionic Framework
Getting started with the Ionic FrameworkGetting started with the Ionic Framework
Getting started with the Ionic FrameworkAnuradha Weeraman
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Mark Leusink
 
Introduction to the Ionic Framework
Introduction to the Ionic FrameworkIntroduction to the Ionic Framework
Introduction to the Ionic Frameworkrrjohnson85
 
Ionic Advisory: Your partner at every stage of development
Ionic Advisory: Your partner at every stage of development Ionic Advisory: Your partner at every stage of development
Ionic Advisory: Your partner at every stage of development Ionic Framework
 
Cordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ CodeaholicsCordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ CodeaholicsEddie Lau
 
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...VMware Tanzu
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicErmias Bayu
 
Ionic - Hybrid Mobile Application Framework
Ionic - Hybrid Mobile Application FrameworkIonic - Hybrid Mobile Application Framework
Ionic - Hybrid Mobile Application FrameworkSanjay Kumar
 
Pepperoni 2.0 - How to spice up your mobile apps
Pepperoni 2.0 - How to spice up your mobile apps Pepperoni 2.0 - How to spice up your mobile apps
Pepperoni 2.0 - How to spice up your mobile apps Futurice
 
Building Salesforce1 Communities Apps with React Native and Flux
Building Salesforce1 Communities Apps with React Native and FluxBuilding Salesforce1 Communities Apps with React Native and Flux
Building Salesforce1 Communities Apps with React Native and FluxSalesforce Developers
 
Reark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJavaReark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJavaFuturice
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React NativeSambhu Lakshmanan
 
Use Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile applicationUse Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile applicationLucio Grenzi
 
Mobile test automation with Selenium, Selendroid and ios-driver
Mobile test automation with Selenium, Selendroid and ios-driverMobile test automation with Selenium, Selendroid and ios-driver
Mobile test automation with Selenium, Selendroid and ios-driverMichael Palotas
 

What's hot (20)

Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic Framework
 
Hybrid app in ionic framework overview
Hybrid app in ionic framework overviewHybrid app in ionic framework overview
Hybrid app in ionic framework overview
 
Build Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic FrameworkBuild Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic Framework
 
Intro to mobile apps with the ionic framework & angular js
Intro to mobile apps with the ionic framework & angular jsIntro to mobile apps with the ionic framework & angular js
Intro to mobile apps with the ionic framework & angular js
 
IONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentIONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App Development
 
Getting started with the Ionic Framework
Getting started with the Ionic FrameworkGetting started with the Ionic Framework
Getting started with the Ionic Framework
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
 
Introduction to the Ionic Framework
Introduction to the Ionic FrameworkIntroduction to the Ionic Framework
Introduction to the Ionic Framework
 
Ionic Advisory: Your partner at every stage of development
Ionic Advisory: Your partner at every stage of development Ionic Advisory: Your partner at every stage of development
Ionic Advisory: Your partner at every stage of development
 
Cordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ CodeaholicsCordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ Codeaholics
 
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
 
Ionic - Hybrid Mobile Application Framework
Ionic - Hybrid Mobile Application FrameworkIonic - Hybrid Mobile Application Framework
Ionic - Hybrid Mobile Application Framework
 
Pepperoni 2.0 - How to spice up your mobile apps
Pepperoni 2.0 - How to spice up your mobile apps Pepperoni 2.0 - How to spice up your mobile apps
Pepperoni 2.0 - How to spice up your mobile apps
 
Building Salesforce1 Communities Apps with React Native and Flux
Building Salesforce1 Communities Apps with React Native and FluxBuilding Salesforce1 Communities Apps with React Native and Flux
Building Salesforce1 Communities Apps with React Native and Flux
 
Reark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJavaReark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJava
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Use Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile applicationUse Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile application
 
Mobile test automation with Selenium, Selendroid and ios-driver
Mobile test automation with Selenium, Selendroid and ios-driverMobile test automation with Selenium, Selendroid and ios-driver
Mobile test automation with Selenium, Selendroid and ios-driver
 

Similar to Top Cordova Challenges and How to Tackle Them

Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkTroy Miles
 
Hybrid Apps in a Snap
Hybrid Apps in a SnapHybrid Apps in a Snap
Hybrid Apps in a SnapPaulina Gallo
 
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
 
Droidcon thessaloniki 2015
Droidcon thessaloniki 2015Droidcon thessaloniki 2015
Droidcon thessaloniki 2015Raymond Chenon
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGapJoseph Labrecque
 
Hybrid Mobile Apps - Meetup
Hybrid Mobile Apps - MeetupHybrid Mobile Apps - Meetup
Hybrid Mobile Apps - MeetupSanjay Patel
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSPhilipp Burgmer
 
Build PWA with Ionic Toolkit
Build PWA with Ionic ToolkitBuild PWA with Ionic Toolkit
Build PWA with Ionic ToolkitPavel Kurnosov
 
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
 
Hybrid Mobile Applications
Hybrid Mobile ApplicationsHybrid Mobile Applications
Hybrid Mobile ApplicationsRuwan Ranganath
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Jonas Bandi
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Jonas Bandi
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Ryan Cuprak
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformAndrew Ferrier
 
Apache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app developmentApache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app developmentwebprogr.com
 

Similar to Top Cordova Challenges and How to Tackle Them (20)

Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 
Apache cordova
Apache cordovaApache cordova
Apache cordova
 
Hybrid Apps in a Snap
Hybrid Apps in a SnapHybrid Apps in a Snap
Hybrid Apps in a Snap
 
Ionic2 First Lesson of Four
Ionic2 First Lesson of FourIonic2 First Lesson of Four
Ionic2 First Lesson of Four
 
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
 
Droidcon thessaloniki 2015
Droidcon thessaloniki 2015Droidcon thessaloniki 2015
Droidcon thessaloniki 2015
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
 
Hybrid Mobile Apps - Meetup
Hybrid Mobile Apps - MeetupHybrid Mobile Apps - Meetup
Hybrid Mobile Apps - Meetup
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJS
 
Build PWA with Ionic Toolkit
Build PWA with Ionic ToolkitBuild PWA with Ionic Toolkit
Build PWA with Ionic Toolkit
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
Ionic
IonicIonic
Ionic
 
Hybrid Mobile Applications
Hybrid Mobile ApplicationsHybrid Mobile Applications
Hybrid Mobile Applications
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst Platform
 
Apache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app developmentApache Cordova phonegap plugins for mobile app development
Apache Cordova phonegap plugins for mobile app development
 

More from Ionic Framework

Live Demo: 1-click push to app stores
Live Demo: 1-click push to app storesLive Demo: 1-click push to app stores
Live Demo: 1-click push to app storesIonic Framework
 
Build your first Ionic React app
Build your first Ionic React appBuild your first Ionic React app
Build your first Ionic React appIonic Framework
 
Offline Storage: Build secure, offline-first apps
Offline Storage: Build secure, offline-first appsOffline Storage: Build secure, offline-first apps
Offline Storage: Build secure, offline-first appsIonic Framework
 
Ionic Auth Connect: Single Sign-on Made Easy
Ionic Auth Connect: Single Sign-on Made EasyIonic Auth Connect: Single Sign-on Made Easy
Ionic Auth Connect: Single Sign-on Made EasyIonic Framework
 
Submitting ionic apps to app stores
Submitting ionic apps to app storesSubmitting ionic apps to app stores
Submitting ionic apps to app storesIonic Framework
 
Introducing: Ionic Studio & Appflow A Better Way to Build Apps
Introducing: Ionic Studio & Appflow A Better Way to Build AppsIntroducing: Ionic Studio & Appflow A Better Way to Build Apps
Introducing: Ionic Studio & Appflow A Better Way to Build AppsIonic Framework
 

More from Ionic Framework (9)

Ionic event: March 2021
Ionic event: March 2021Ionic event: March 2021
Ionic event: March 2021
 
Live Demo: 1-click push to app stores
Live Demo: 1-click push to app storesLive Demo: 1-click push to app stores
Live Demo: 1-click push to app stores
 
Build your first Ionic React app
Build your first Ionic React appBuild your first Ionic React app
Build your first Ionic React app
 
Ionic React
Ionic ReactIonic React
Ionic React
 
Offline Storage: Build secure, offline-first apps
Offline Storage: Build secure, offline-first appsOffline Storage: Build secure, offline-first apps
Offline Storage: Build secure, offline-first apps
 
Ionic Auth Connect: Single Sign-on Made Easy
Ionic Auth Connect: Single Sign-on Made EasyIonic Auth Connect: Single Sign-on Made Easy
Ionic Auth Connect: Single Sign-on Made Easy
 
Submitting ionic apps to app stores
Submitting ionic apps to app storesSubmitting ionic apps to app stores
Submitting ionic apps to app stores
 
Introducing: Ionic Studio & Appflow A Better Way to Build Apps
Introducing: Ionic Studio & Appflow A Better Way to Build AppsIntroducing: Ionic Studio & Appflow A Better Way to Build Apps
Introducing: Ionic Studio & Appflow A Better Way to Build Apps
 
A Vue from Ionic
A Vue from IonicA Vue from Ionic
A Vue from Ionic
 

Recently uploaded

%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
 
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
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%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
 
%+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
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
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
 
%+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
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
+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
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
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 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
 
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
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%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
 
%+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...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
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
 
%+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...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
+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...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
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...
 
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...
 

Top Cordova Challenges and How to Tackle Them

  • 1. Top Cordova Challenges And How To Tackle Them March 2019
  • 2. Today’s Speakers Matt Netkow Senior Product Evangelist Bryant Plano Solutions Consultant
  • 3. Today’s Agenda Intro: What is a Hybrid App? Cordova? Ionic? Tips for Addressing Top Cordova Challenges 1. Dependency Management 2. Build Failures 3. Native Bugs & Missing Features 4. Finding the Right Plugin Live Demo
  • 4. What is a Hybrid App? HTML, CSS, JavaScript Runs in a “browser” WebView Wrapped in native app shell Access device capabilities via plugins A native app! Cordova/ PhoneGap
  • 5. Ionic Framework Mobile-ready UI library that works everywhere: any platform, any device, any framework. ➔ Build for iOS, Android, Electron, PWAs, Web ➔ One codebase across all platforms ➔ Use basic web skills: HTML, JS, CSS ➔ Full access to Native APIs and Plugins
  • 7. Project Dependencies Incompatibilities may exist between each layer of the stack: - Web Framework (Angular, Vue, React) - 3rd Party JavaScript Libraries - Ionic - Cordova Platforms - Cordova Plugins (and Ionic Native)
  • 8. What We’ll Cover 1. JavaScript Libraries 2. Version Management 3. Cordova & Ionic Native Dependencies 4. Angular 5. Ionic CLI 6. Ionic Framework
  • 9. JavaScript Libraries "dependencies": { "@angular/common": "^7.2.2", "@angular/router": "^7.2.2", "@ionic-native/camera": "^5.2.0", "@ionic-native/core": "^5.0.0", "@ionic-native/splash-screen": "^5.0.0", "@ionic-native/status-bar": "^5.0.0", "@ionic/angular": "^4.1.0", "cordova-android": "7.1.4", "cordova-ios": "5.0.0", "cordova-plugin-camera": "^4.0.3" }, package.json package.lock.json "dependencies": { "@angular-devkit/architect": { "version": "0.11.4", "resolved": "https://registry.npmjs.org/@angular-devkit/ar chitect/-/architect-0.11.4.tgz", "integrity": "sha512-2zi6S9tPlk52vyqN67IvFoeNgd0uxtrPlwl 3TdvJ3wrH7sYGJnkQ+EzAE7cKUGWAV989BbNtx 2YxhRDHnN21Fg==", "dev": true, "requires": { "@angular-devkit/core": "7.1.4", "rxjs": "6.3.3" }
  • 10. ‘npm install’ Defaults to Minor Version * (asterisk): Latest major version - *x.x.x (aka wildcard, “Wild West”) ^ (carat): Latest minor version: ^1.x.x (Somewhat restrictive) ~ (tilde): Latest patch version: ~1.1.x (Bug fixes only) (none): Exact version: 1.1.3 (Most locked down)
  • 11. Tips for Version Management Lock Version Explicitly Lock to Patch Version Add .npmrc File 1 2 3
  • 12. Cordova Dependencies Platforms package.json - JavaScript "cordova-ios": "5.0.0", "cordova-android": "7.1.4", config.xml - Native <engine name="ios" spec="5.0.0" /> <engine name="android" spec="7.1.4" /> <platform name="android" /> <platform name="ios" /> Plugins package.json - JavaScript "cordova-plugin-splashscreen": "5.0.2", "cordova-plugin-statusbar": "2.4.2", config.xml - Native <plugin name="cordova-plugin-splashscreen" spec="5.0.2" /> <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
  • 13. Tips for Cordova Management 1. Use the CLI instead of directly editing config.xml and package.json a. ionic cordova [command] - better experience w/additional functionality 2. Upgrade safely: Remove, then re-add plugin. a. ionic cordova plugin remove cordova-plugin-camera b. ionic cordova plugin add cordova-plugin-camera 3. Use explicit versions: ionic cordova plugin add cordova-plugin-camera@4.3.2
  • 14. Tips for Cordova Management 5. Restore platforms and plugins a. ionic cordova prepare restores platforms and plugins from package.json and config.xml b. Version to install is taken from package.json or config.xml, if found c. In case of conflicts, package.json is given precedence over config.xml 6. Use Ionic CLI commands a. ionic doctor: Detects common issues and suggests steps to fix them b. ionic repair: Remove, regenerate all dependencies
  • 15. Ionic Native Dependencies Ionic Native: TypeScript “Wrappers” around Cordova plugins https://ionicframework.com/docs/native 1. Review Cordova GitHub page for Issues, Releases a. Example: https://github.com/apache/cordova-plugin-camera 2. Update to latest of both Ionic Native and Cordova plugins if possible 3. Review Release Notes a. See https://github.com/ionic-team/ionic-native/releases 4. Cordova Plugins: If not using Releases tab, then check
  • 16. Angular Dependencies ng update Update Tool https://update.angular.io
  • 17. Ionic CLI Ionic CLI is NOT Ionic Framework 1. Update CLI: a. npm install -g ionic 2. Update Framework (aka your Ionic project): a. npm install @ionic/angular@latest Ionic version numbers do not match across the board (ionic info): 1. Ionic CLI: 4.12.0 2. Ionic Framework (@ionic/angular): 4.1.2 3. Ionic Native (@ionic-native/core): ^5.2.0
  • 18. Ionic Framework 1. Ionic 4: @ionic/angular, @ionic/vue, @ionic/react 2. Ionic 3: ionic-angular
  • 19. Dependency Strategy: Small Changes Go one step at a time - Why? Reduce the surface area for issues to arise - Separate branches, one for each layer of the stack - Ionic - Cordova Platforms - Cordova Plugins (and Ionic Native) - Web Framework (Angular, Vue, React) - Additional 3rd Party JavaScript Libraries Test, test, test!
  • 20. Dependency Strategy: Update Often The most stable apps are routinely updated, especially at the native layer - Security fixes - New Features - Improved performance When should I update? - Research: Official blogs and news - Nature of the update: Shiny new feature or critical security fix? - Timing: Where does it fit in against Team/Project goals?
  • 21. #2 Conflicts & Build Failures
  • 23. Plugins conflict with each other when they share underlying native dependencies - More than one plugin trying to access the same native code - Example: Google Play Services version - Google Maps: GPS v24.2 but Firebase wants GPS v27.1 and Google Auth wants... Tip: Ensure using only one plugin per specific feature/functionality - Example: Push Notifications Cordova Plugin Conflicts
  • 24. Research the build error(s) by checking out these resources: 1. Ionic Customer Success Knowledge base: https://ionic.zendesk.com 2. Google & StackOverflow: Many errors are documented online 3. Ionic Forum: https://forum.ionicframework.com (Ionic Native category) 4. Ionic Worldwide Slack: https://ionicworldwide.herokuapp.com Troubleshooting Failed Builds
  • 26. #3 Bugs & Feature Requests
  • 27. Plugins are open source, but… they’re built with native code What can you do? 1. File an issue on GitHub, contact the maintainer directly 2. Hire native developers 3. Contract out (agencies, contractors, consultancies) Ionic has a solution for this... How to Update/Fix OSS Plugins?
  • 28. #4 Finding the Right Plugin
  • 29. Use the Web Platform when possible: https://whatwebcando.today/ Do You Need One?
  • 30. Start with Ionic Native ● OSS Cordova plugins wrapped in TypeScript ● See library at https://ionicframework.com/docs/native Search the OSS community ● Core plugins are named “cordova-plugin-X” under Apache GitHub repo ● Look for official plugins, backed by a company ○ Review maintenance record ○ Recent, consistent commits? ○ When was the last release? ○ High issue count may be a concern, may not be Tips for Picking a Plugin
  • 32. Capacitor: Cordova, Reimagined Feature Cordova Capacitor Supported Platforms iOS, Android, Windows Phone iOS, Android, Desktop (Windows, Mac, Linux), Web, PWA, and beyond! Configuration style Abstracted (Config.xml) Per-platform (Info.plist, AndroidManifest.xml) Native platform control Limited Full control Production ready? Yes, stable Soon https://capacitor.ionicframework.comhttps://ion.link/capacitor-yt
  • 34. Native Bridge Easy access to native device features and third-party apps. ➔ Core library of native device functionality ➔ Integrations with popular third-party apps ➔ Proactive security and maintenance updates ➔ Support SLA backed by Ionic
  • 35. Reality of OSS Cordova Development Multiple plugin APIs Multiple points of failure Multiple maintainers No support SLA
  • 36. Enterprise Edition: One API, Any Connection One plugin API Fully maintained by Ionic Easy access to device features Pre-built & custom integrations Works across mobile, desktop, PWA