SlideShare a Scribd company logo
1 of 52
Download to read offline
Cross Platform
Progressive Web
Apps
Simon MacDonald
@macdonst
What is a Progressive
Web App?
“ Progressive Web Apps use modern web
capabilities to deliver an app-like user
experience.
“ They evolve from pages in browser tabs
to immersive, top-level apps, maintaining
the web's low friction at every moment.
“ So they're
just web
pages?
Progressive
Works for every user,
regardless of browser
choice because it's built
with progressive
enhancement as a core
tenet.
Responsive
Fits any form factor:
desktop, mobile, tablet, or
whatever is next.
Connectivity
Independent
Enhanced with service
workers to work offline or
on low-quality networks.
© Google
App Like
Feels like an app, because
the app shell model
separates the application
functionality from
application content.
Content
Safe
Served via HTTPS to
prevent snooping and to
ensure content hasn't been
tampered with
NOT!
Re-engagable
Makes re-engagement easy
through features like push
notifications.
Installable
Allows users to add apps
they find most useful to
their home screen without
the hassle of an app store.
Linkable
Easily share the application
via URL, does not require
complex installation.
Discoverable
Is identifiable as an
"application" thanks to W3C
manifest and service
worker registration scope,
allowing search engines to
find it.
// index.html
<link rel="manifest" href="/manifest.json">
// manifest.json
{
"short_name": "AirHorner",
"name": "Kinlan's AirHorner of Infamy",
"icons": [
{
"src": "launcher-icon-1x.png",
"type": "image/png",
"sizes": "48x48"
},
{
"src": "launcher-icon-2x.png",
"type": "image/png",
"sizes": "96x96"
},
{
"src": "launcher-icon-4x.png",
"type": "image/png",
"sizes": "192x192"
}
],
"start_url": "index.html?launcher=true"
}
It all starts with
<link rel="manifest" href="manifest.json">
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html?start=a2hs",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
App Shell Architecture
Service Workers
“ A service worker is a script
that your browser runs in the
background, separate from a
web page
Registration
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/service-worker.js');
});
}
Installation
var CACHE_VERSION = 'v1';
var CACHE_LIST = ['index.html', 'css/main.css', 'js/main.js'];
self.addEventListener('install', function(event) {
event.waitUntil(caches.open(CACHE_VERSION)
.then(function(cache) {
return cache.addAll(CACHE_LIST);
}));
});
Activation
self.addEventListener('activate', function(event) {
console.log("service worker has been activated.");
});
Fetch
self.addEventListener('fetch', function(event) {
console.log('Handling fetch event for ' + event.request.url);
event.respondWith(
caches.match(event.request).then(function(response) {
if (response) {
console.log('Found response in cache:', response);
return response;
}
console.log('No response found in cache. Fetch from network...');
return fetch(event.request);
})
);
});
index.html
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
<meta
name="apple-mobile-web-app-title"
content="PWA Test">
index.html
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
<meta
name="apple-mobile-web-app-capable"
content="yes">
index.html
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
<meta name=
"apple-mobile-web-app-status-bar-style"
content="black">
index.html
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
<link
rel="apple-touch-icon"
href="img/icons/apple-touch-icon.png">
index.html
"short_name": "PWA Test",
"name": "PWA Test",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#2196F3",
"description": "A sample PWA.",
"icons": [
{
"src": "img/logo-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
manifest.json
<link
rel="apple-touch-startup-image"
href="img/Default-Portrait.png">
phonegap-plugin-pwa
phonegap-plugin-
service-worker
cordova plugin add https://github.com/phonegap/phonegap-plugin-service-worker
<preference name="ServiceWorker" value="service-worker.js" />
<preference name="CacheCordovaAssets" value="false" />
cordova create myApp --template=<PATH TO ASSETS>
Create an App from your assets
Add the Service Worker plugin
Modify config.xml
cordova run ios
Run your app
npm install -g cordova
Install the Cordova CLI
You're Awesome
The End
Recommended Reading
(article)
(book)
(video)
(article)
Hey, Hey, Cloud Four is a PWA!
Responsive Web Design
Web Push Notifications
Don’t use iOS meta tags irresponsibly in your
Progressive Web Apps

More Related Content

What's hot

Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWeb
Dave Bouwman
 
Browser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom Menace
Nicholas Zakas
 

What's hot (20)

How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
 
Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)Web Components & Polymer 1.0 (Webinale Berlin)
Web Components & Polymer 1.0 (Webinale Berlin)
 
The web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulThe web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - Istanbul
 
Enough with the JavaScript already!
Enough with the JavaScript already!Enough with the JavaScript already!
Enough with the JavaScript already!
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
 
Building a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / SpringBuilding a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / Spring
 
The Art of AngularJS in 2015
The Art of AngularJS in 2015The Art of AngularJS in 2015
The Art of AngularJS in 2015
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applications
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWeb
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
Develop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will loveDevelop a vanilla.js spa you and your customers will love
Develop a vanilla.js spa you and your customers will love
 
AEM responsive
AEM responsiveAEM responsive
AEM responsive
 
Browser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom Menace
 
AtlasCamp 2015: Using add-ons to build add-ons
AtlasCamp 2015: Using add-ons to build add-onsAtlasCamp 2015: Using add-ons to build add-ons
AtlasCamp 2015: Using add-ons to build add-ons
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Enough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas ZakasEnough with the javas cript already! de Nicholas Zakas
Enough with the javas cript already! de Nicholas Zakas
 

Similar to Building Progressive Web Apps for Android and iOS

Cloud Endpoints _Polymer_ Material design by Martin Görner
Cloud Endpoints_Polymer_Material design by Martin GörnerCloud Endpoints_Polymer_Material design by Martin Görner
Cloud Endpoints _Polymer_ Material design by Martin Görner
European Innovation Academy
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
Robert Nyman
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
Igor Bronovskyy
 

Similar to Building Progressive Web Apps for Android and iOS (20)

Building Progressive Web Apps for Windows devices
Building Progressive Web Apps for Windows devicesBuilding Progressive Web Apps for Windows devices
Building Progressive Web Apps for Windows devices
 
Progressive Web Apps - Intro & Learnings
Progressive Web Apps - Intro & LearningsProgressive Web Apps - Intro & Learnings
Progressive Web Apps - Intro & Learnings
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Bruce Lawson: Progressive Web Apps: the future of Apps
Bruce Lawson: Progressive Web Apps: the future of AppsBruce Lawson: Progressive Web Apps: the future of Apps
Bruce Lawson: Progressive Web Apps: the future of Apps
 
Cloud Endpoints _Polymer_ Material design by Martin Görner
Cloud Endpoints_Polymer_Material design by Martin GörnerCloud Endpoints_Polymer_Material design by Martin Görner
Cloud Endpoints _Polymer_ Material design by Martin Görner
 
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP AnywayI Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP AnywayI Know It Was MEAN, But I Cut the Cord to LAMP Anyway
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
 
Atomic Design con Pattern Lab
Atomic Design con Pattern LabAtomic Design con Pattern Lab
Atomic Design con Pattern Lab
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
 
Progressive Web Apps - NPD Meet
Progressive Web Apps - NPD MeetProgressive Web Apps - NPD Meet
Progressive Web Apps - NPD Meet
 
Service workers
Service workersService workers
Service workers
 
Pivorak.javascript.global domination
Pivorak.javascript.global dominationPivorak.javascript.global domination
Pivorak.javascript.global domination
 
Andriy Vandakurov about "Frontend. Global domination"
Andriy Vandakurov about  "Frontend. Global domination" Andriy Vandakurov about  "Frontend. Global domination"
Andriy Vandakurov about "Frontend. Global domination"
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
 
Make your PWA feel more like an app
Make your PWA feel more like an appMake your PWA feel more like an app
Make your PWA feel more like an app
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Web
 
Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive Boston
 
Micro app-framework
Micro app-frameworkMicro app-framework
Micro app-framework
 

More from FITC

Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital Health
FITC
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
FITC
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight Websites
FITC
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is Terrifying
FITC
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future Human
FITC
 

More from FITC (20)

Cut it up
Cut it upCut it up
Cut it up
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital Health
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech Stack
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR Project
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the Answer
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s Story
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday Innovation
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight Websites
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is Terrifying
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future Human
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR Game
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare System
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product Design
 
The Power of Now
The Power of NowThe Power of Now
The Power of Now
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAs
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstack
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self Discovery
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time For
 

Recently uploaded

+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@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+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...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Building Progressive Web Apps for Android and iOS

  • 3. What is a Progressive Web App?
  • 4. “ Progressive Web Apps use modern web capabilities to deliver an app-like user experience. “ They evolve from pages in browser tabs to immersive, top-level apps, maintaining the web's low friction at every moment.
  • 5. “ So they're just web pages?
  • 6.
  • 7.
  • 8. Progressive Works for every user, regardless of browser choice because it's built with progressive enhancement as a core tenet.
  • 9. Responsive Fits any form factor: desktop, mobile, tablet, or whatever is next.
  • 10. Connectivity Independent Enhanced with service workers to work offline or on low-quality networks. © Google
  • 11. App Like Feels like an app, because the app shell model separates the application functionality from application content. Content
  • 12. Safe Served via HTTPS to prevent snooping and to ensure content hasn't been tampered with NOT!
  • 13. Re-engagable Makes re-engagement easy through features like push notifications.
  • 14. Installable Allows users to add apps they find most useful to their home screen without the hassle of an app store.
  • 15. Linkable Easily share the application via URL, does not require complex installation.
  • 16. Discoverable Is identifiable as an "application" thanks to W3C manifest and service worker registration scope, allowing search engines to find it. // index.html <link rel="manifest" href="/manifest.json"> // manifest.json { "short_name": "AirHorner", "name": "Kinlan's AirHorner of Infamy", "icons": [ { "src": "launcher-icon-1x.png", "type": "image/png", "sizes": "48x48" }, { "src": "launcher-icon-2x.png", "type": "image/png", "sizes": "96x96" }, { "src": "launcher-icon-4x.png", "type": "image/png", "sizes": "192x192" } ], "start_url": "index.html?launcher=true" }
  • 17. It all starts with <link rel="manifest" href="manifest.json">
  • 18. "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json
  • 19. "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json
  • 20. "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json
  • 21. "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html?start=a2hs", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ]
  • 22. "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json
  • 23. "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json
  • 24. "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json
  • 25. "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json
  • 27.
  • 28.
  • 29.
  • 30. Service Workers “ A service worker is a script that your browser runs in the background, separate from a web page
  • 31. Registration if ('serviceWorker' in navigator) { window.addEventListener('load', function() { navigator.serviceWorker.register('/service-worker.js'); }); }
  • 32. Installation var CACHE_VERSION = 'v1'; var CACHE_LIST = ['index.html', 'css/main.css', 'js/main.js']; self.addEventListener('install', function(event) { event.waitUntil(caches.open(CACHE_VERSION) .then(function(cache) { return cache.addAll(CACHE_LIST); })); });
  • 34. Fetch self.addEventListener('fetch', function(event) { console.log('Handling fetch event for ' + event.request.url); event.respondWith( caches.match(event.request).then(function(response) { if (response) { console.log('Found response in cache:', response); return response; } console.log('No response found in cache. Fetch from network...'); return fetch(event.request); }) ); });
  • 35.
  • 36.
  • 37.
  • 38.
  • 39. index.html "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json <meta name="apple-mobile-web-app-title" content="PWA Test">
  • 40. index.html "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json <meta name="apple-mobile-web-app-capable" content="yes">
  • 41. index.html "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json <meta name= "apple-mobile-web-app-status-bar-style" content="black">
  • 42. index.html "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json <link rel="apple-touch-icon" href="img/icons/apple-touch-icon.png">
  • 43. index.html "short_name": "PWA Test", "name": "PWA Test", "start_url": "index.html", "display": "standalone", "background_color": "#fff", "theme_color": "#2196F3", "description": "A sample PWA.", "icons": [ { "src": "img/logo-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "img/logo-512.png", "sizes": "512x512", "type": "image/png" } ] manifest.json <link rel="apple-touch-startup-image" href="img/Default-Portrait.png">
  • 44.
  • 45.
  • 46.
  • 49. cordova plugin add https://github.com/phonegap/phonegap-plugin-service-worker <preference name="ServiceWorker" value="service-worker.js" /> <preference name="CacheCordovaAssets" value="false" /> cordova create myApp --template=<PATH TO ASSETS> Create an App from your assets Add the Service Worker plugin Modify config.xml cordova run ios Run your app npm install -g cordova Install the Cordova CLI
  • 52. Recommended Reading (article) (book) (video) (article) Hey, Hey, Cloud Four is a PWA! Responsive Web Design Web Push Notifications Don’t use iOS meta tags irresponsibly in your Progressive Web Apps