pwa-pushwoosh-sample
Mobile icon

PWA PushWoosh Sample

Stable version 1.0.4 (Compatible with OutSystems 11)
Uploaded
 on 23 April 2020
 by 
Ricardo Costa
0.0
 (0 ratings)
pwa-pushwoosh-sample

PWA PushWoosh Sample

Compatible with:
Created on OutSystems 11

Version 1.0.4

Stable
Current
Uploaded on 23 April 2020 by Ricardo Costa
Compatible with:
Version 11
11.9.2 or higher
11.7.6 to 11.9.0
11.0.606 to 11.0.615
Database:
All
Release notes:

Update Service Worker with a problem related with the scope is now fixed.

Application Objects:
PWA PushWoosh Sample has 5 AOs.

Version 1.0.3

Stable
Uploaded on 17 April 2020 by Ricardo Costa
Compatible with:
Version 11
11.9.2 or higher
11.7.6 to 11.9.0
11.0.606 to 11.0.615
Database:
All
Release notes:

Auto import the default service worker code.


Now you don't need to copy the code inside the pwaServiceWorker.js and put it manually in the new service worker. You just have to create the new resource that will have the code you need and append "self.importScripts('/<your_module>/pwaServiceWorker.js');"


This way you will keep the code generate in the default service worker and your new code as well.


For the purposes of just adding the import push woosh service worker in the new service worker resource and doing the mentioned self.importScripts, you can leave everything as is in the sample and it will work just fine.


And don't forget that in order to configure this for your own Firebase and PushWoosh accounts you need to:

- Change the values of the site properties ApiAccessToken and ApplicationCode

- Go to the extensibility configurations and in the PWA Manifest change the gcm_sender_id for the one that you have in your Firebase

- In the InitPushWoosh script replace the applicationCode by the one you have been assigned by PushWoosh

- In that same script, replace in the navigator.serviceWorker.register and in the serviceWorkerUrl the name of this eSpace by your own.


Also, don't forget to clear the cache if you were already using this sample.


Thank you,


Ricardo

Application Objects:
PWA PushWoosh Sample has 5 AOs.

Version 1.0.2

Stable
Uploaded on 14 April 2020 by Ricardo Costa
Compatible with:
Version 11
11.9.2 or higher
11.7.6 to 11.9.0
11.0.606 to 11.0.615
Database:
All
Release notes:

Fixed Service Worker bug.

This sample uses the pwaServiceWorker created by the platform and appends in the beginning the import needed by pushwoosh.

At the moment the only option is to copy the code inside that pwaServiceWorker.js and put it manually as a resource (pwaServiceWorkerNew.js) in your module appending the "importScripts('https://cdn.pushwoosh.com/webpush/v3/pushwoosh-service-worker.js' + self.location.search)" in the beginning.

That way when initializing push woosh the default service worker (pwaServiceWorker) created by the Platform will be updated with this new one.

I will try to find a more definitive and scalable solution but for now this is the way to do it.

Application Objects:
PWA PushWoosh Sample has 5 AOs.