Bringing your PWA to App Stores

A presentation at PWA Summit in October 2021 in by Micah Engle-Eshleman

Slide 1

Slide 1

Bringing your PWA to App Stores Micah Engle-Eshleman Fullstack @ BeFunky View talk here: youtu.be/qbh_u2hvIjg?t=15600

Slide 2

Slide 2

Why App Stores? • Discovery: users search for apps in stores

Slide 3

Slide 3

Why App Stores? • Discovery: users search for apps in stores • Higher trust & familiarity with app installation process

Slide 4

Slide 4

Why App Stores? • Discovery: users search for apps in stores • Higher trust & familiarity with app installation process • Packaging your PWA is relatively painless. Reuse the same codebase but increase distribution.

Slide 5

Slide 5

Which App Stores? • Play Store (Android/ChromeOS) • Microsoft Store (Windows) • Samsung Galaxy Store (Android) • App Store* (iOS/Mac) * requires significant refactoring

Slide 6

Slide 6

Quickstart Try out pwabuilder.com Packages your PWA for all supported app stores!

Slide 7

Slide 7

Slide 8

Slide 8

twa-manifest.json

Slide 9

Slide 9

Bubblewrap CLI Packages PWA for Play Store (as Trusted Web Activity) $ npm install -g @bubblewrap/cli $ bubblewrap init —manifest=”manifest url…” $ bubblewrap build Quickstart article | Docs on Github

Slide 10

Slide 10

Version Control

Slide 11

Slide 11

Case Study befunky.com

Slide 12

Slide 12

Slide 13

Slide 13

Background - Frontend: WebGL, Lit-html, Web Components

Slide 14

Slide 14

Background - Frontend: WebGL, Lit-html, Web Components Audience: mostly desktop, some tablet (mobile coming soon) - 2-3 million monthly users - 6k monthly PWA users (3x engagement)

Slide 15

Slide 15

Background -

Frontend: WebGL, Lit-html, Web Components Audience: mostly desktop, some tablet (mobile coming soon) - 2-3 million monthly users - 6k monthly PWA users (3x engagement) Why the Play Store? ChromeOS is an increasingly popular desktop market

Slide 16

Slide 16

Which App Stores? • Play Store (Android/ChromeOS) • Microsoft Store (Windows) • Samsung Galaxy Store (Android) • App Store* (iOS/Mac) * requires significant refactoring

Slide 17

Slide 17

Submitting PWA to Play Store -

Package PWA using Bubblewrap CLI Upload AAB file to Google Play Console Create new release (testing or production)

Slide 18

Slide 18

Analytics How to know if PWA was installed from your website or via an app store? - Customize start URL (in twa-manifest.json)

Save flag in SessionStorage Article: Bulletproof PWA & TWA Detection micahjon.com/2021/pwa-twa-detection

Slide 19

Slide 19

Payments How to charge users and keep track of subscriptions

Slide 20

Slide 20

App stores manage… - Prices for products/subscriptions

User’s access to products/subscriptions

User’s payment methods

Payment flow

Renewal and cancellation

Slide 21

Slide 21

PWAs in the Play Store - Prices for products/subscriptions

User’s access to products/subscriptions

User’s payment methods

Payment flow

Renewal and cancellation Digital Goods API Payment Request API

Slide 22

Slide 22

Digital Goods API - Prices for products/subscriptions

User’s access to products/subscriptions

Slide 23

Slide 23

Digital Goods API

Slide 24

Slide 24

Intl.NumberFormat Display price in the user’s preferred currency and language

Slide 25

Slide 25

Payment Request API - Prompts payment (in user’s preferred currency & locale)

Processes payment (with user’s payment method)

Slide 26

Slide 26

Slide 27

Slide 27

Payment Request API

Slide 28

Slide 28

Payment Request API Show Prompt

Slide 29

Slide 29

Payment Request API Validate Payment

Slide 30

Slide 30

Payment Request API Acknowledge Purchase

Slide 31

Slide 31

Payment Request API Tell browser that payment succeeded (closes native payment prompt)

Slide 32

Slide 32

Care about PWAs and web performance? Come work with us!

Slide 33

Slide 33

Thanks! You can find me at on the web at micahjon.com @micahjon on Github, @micahjme on Twitter Try out BeFunky at befunky.com/create Thanks to Alexander Nohe and Sam Richard at Google for their encouragement and advice!