Using a service worker to update an hybrid mobile app like a PWA

long time ago I build myself a copy of the Devapp, when cordova was still the container to use

It allows you to bootstrap web apps in android, after udp discovery of web servers.

This keeps the web assets remotely, so a different way to bootstrap the container.

Out of my head, if I were to try this with capacitor, I reckon it requires a bit of rethinking. I am fairly sure, replacing the assets in the app container will require native code. I believe the Ionic cordova plugin to facilitate app flow (earlier version) did the same. That code might still be around - and was basically polling a zip file remotely and then unpacked it into the asset folder. Edit: cordova-plugin-ionic/src/android at master · ionic-team/cordova-plugin-ionic · GitHub

The alternative deployment would be the one mentioned earlier - via remote assets. Then, assuming service workers function in android/ios capacitor containers, this potentially could help updating, even though not sure if the service worker likes polling remote sites.

Some thoughts…