You've successfully generated a web manifest and service worker for your web app. Once you add these to your app, you'll be a PWA that can be published to app stores. 😎 (Don't have an app yet? Check out our PWA Starter Kit)
Your next steps:
- Upload
manifest.json
to your server - Upload
pwabuilder-sw.js
to your server - Upload the
images
folder to your server - Add a manifest link tag to your HTML
- Add a service worker registration snippet to your HTML
Each step is explained below.
Your zip file contains manifest.json
- this is your web manifest that contains metadata about your app, such as name, description, and more.
Upload manifest.json
to the root directory of your web server, e.g. https://myawesomepwa.com/manifest.json.
Your zip file contains pwabuilder-sw.js
- this is your service worker that can provide advanced functionality to your web app. For example, service workers can enable your app to work offline, do push notifications, cache your app's files for faster load times, and more.
Upload pwabuilder-sw.js
to the root directory of your web server, e.g. https://myawesomepwa.com/pwabuilder-sw.js.
Your zip file contains a images
folder containing all the image resources for your app. These images are referenced in your web manifest.
Upload the images
folder to the root directory of your web server. When you're done, you should have working URLs like https://myawesomepwa.com/images/app-icon-512x512.png
Now that you've uploaded your web manifest file, your HTML page should load it.
In the <head>
section of your HTML, add the following code:
<link rel="manifest" href="manifest.json" />
Now that you've uploaded your service worker file, your HTML page should register your service worker.
In the <head>
section of your HTML, add the following code:
<script type="module">
import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
const el = document.createElement('pwa-update');
document.body.appendChild(el);
</script>
If you've followed all these steps, congratulations, you're a Progressive Web App (PWA)! 😎
To verify your app is a PWA, run your URL through PWABuilder again. PWABuilder will report a score for your manifest and service worker, acknowledging your PWA status.
As a PWA, your app can be published to App Stores like Microsoft Store (Windows), Google Play (Android), and more. Run your app URL through PWABuilder and follow the steps to publish to app stores.
If you're otherwise stuck, we're here to help. You can open an issue and we'll help walk you through it.