# How to run Service Worker inside the bubble.io?

**URL:** <https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850>\
**Category:** Mobile\
**Created:** [November 28, 2019, 12:05pm UTC](https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850 "2019-11-28T12:05:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![isuru.anushka1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/isuru.anushka1/32/55374_2.png) [@isuru.anushka1](https://forum.bubble.io/u/isuru.anushka1)\
**Post date:** [November 28, 2019, 12:05pm UTC](https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850/1 "2019-11-28T12:05:06Z")

</div>

Need to build PWA . for that I need to run service workers inside my project.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/c/bc24597eb02d8e10b6d58ca5bcf2804ed30b5366.png)

how I fix this?

---

<div class="post-metadata">

**Author:** ![JohnMark](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnmark/32/42431_2.png) [@JohnMark](https://forum.bubble.io/u/JohnMark)\
**Post date:** [November 28, 2019, 1:56pm UTC](https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850/2 "2019-11-28T13:56:02Z")

</div>

Hi @isuru.anushka1

Not sure what you are ref too. You don’t need any service if you run a PWA (or responsive) app. Can you elaborate your question?

---

<div class="post-metadata">

**Author:** ![isuru.anushka1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/isuru.anushka1/32/55374_2.png) [@isuru.anushka1](https://forum.bubble.io/u/isuru.anushka1)\
**Post date:** [November 29, 2019, 2:58am UTC](https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850/3 "2019-11-29T02:58:35Z")

</div>

i need to add push notification for my PWA. how i do that ?

---

<div class="post-metadata">

**Author:** ![chad](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/chad/32/89415_2.png) [@chad](https://forum.bubble.io/u/chad)\
**Post date:** [November 29, 2019, 11:37am UTC](https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850/4 "2019-11-29T11:37:03Z")

</div>

Service worker from what I know allow the app to run partially offline

---

<div class="post-metadata">

**Author:** ![JohnMark](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnmark/32/42431_2.png) [@JohnMark](https://forum.bubble.io/u/JohnMark)\
**Post date:** [November 29, 2019, 4:41pm UTC](https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850/5 "2019-11-29T16:41:07Z")

</div>

Hi @isuru.anushka1 You can add the popular OneSignal plugins.  
I suggest you the pro version from @mvandrei

* * *

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/a/aa8b1d9d28e707c46d84e49698a45f555dbdc9f9.png)

---

<div class="post-metadata">

**Author:** ![isuru.anushka1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/isuru.anushka1/32/55374_2.png) [@isuru.anushka1](https://forum.bubble.io/u/isuru.anushka1)\
**Post date:** [December 2, 2019, 3:40am UTC](https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850/6 "2019-12-02T03:40:16Z")

</div>

do you have any tutorial on how to connect one signal plugin to [bubble.io](http://bubble.io) ?

---

<div class="post-metadata">

**Author:** ![JohnMark](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnmark/32/42431_2.png) [@JohnMark](https://forum.bubble.io/u/JohnMark)\
**Post date:** [December 2, 2019, 10:50am UTC](https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850/7 "2019-12-02T10:50:23Z")

</div>

Hope you find the info you need

> [@\[NEW PLUGIN\] OneSignal Push Notifications PRO plugin](http://forum.bubble.io/t/new-plugin-onesignal-push-notifications-pro-plugin/57585):
>
> Hey guys, As promised, here is the PRO version of the plugin. It’s easier than ever to have push notifications from [https://www.OneSignal.com](https://www.OneSignal.com) on your Bubble app. It works with: desktop and laptop browsers: Chrome, Safari, Opera, Firefox; mobile devices: iOS and Android - tested with SuperView only [SuperView on CodeCanyon](https://codecanyon.net/collections/6217868-superview) Here is a nice video made by Ryley (thank you!) in which he shows you how to correctly install the plugin. [[OneSignal Push Notifications PRO] ](https://www.youtube.com/watch?v=VqF4DdOBwoE) L.E. [https://ww…](https://www.youtube.com/watch?v=V3cFL60S_qI)

---

<div class="post-metadata">

**Author:** ![lindquisterik1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lindquisterik1/32/75659_2.png) [@lindquisterik1](https://forum.bubble.io/u/lindquisterik1)\
**Post date:** [November 16, 2020, 8:12pm UTC](https://forum.bubble.io/t/how-to-run-service-worker-inside-the-bubble-io/72850/8 "2020-11-16T20:12:09Z")

</div>

So how do either of these (OneSignal or Superview) give you what you need to build a PWA and allow the user to copy it onto their home screen on iOS or Android?

The service worker file is normally created from the webstie root folder commandline and placed in the root folder of the website. However, among other things that requires running

```
npm install --global sw-precache

```

Which creates a cache of all the website resources so the PWA can run by itself and the service worker has the necessary resources.

Part of this seems to be resolved in another forum discussion as it relates to putting scripts into the settings --\> Seo /Metadata

[How do you get a Service worker working on PWAs](http://forum.bubble.io/t/how-do-you-get-a-service-worker-working-on-pwas/100958)

However, it still does not answer how to allow a user to copy a link onto their homescreen? Not sure how onesignal or superview accomplish that either… and they can be expensive…
