PWA
Publishing your app as a PWA to the native store
Last updated
Publishing your app as a PWA to the native store
Last updated
<link rel="manifest" href="/manifest.json"/><script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/service-worker.js', { scope: '/' }).then(function(registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>