Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

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

$
0
0

Hi all,

I’m building a Ionic mobile app, which will be compiled as a native app on Android/iOS (so, not a PWA).

I was wondering if there is a way, using for example service workers, to also point to a remote source (which can be edited by the user) for the code (for example https://example.com/my-ionic-app, which will contain the “dist” folder contents) and use the service worker to fetch the updated code in order to upgrade the app without building and installing a new version?
I am not a service workers expert, the first obstacle that i can think of (maybe a blocking one) is that the local files are served with the localhost domain, and there is no way to specify another domain (much less a dynamic domain).

If this is impossible, what would be the correct approach? Using two webviews, one to show a minimal UI to insert the remote URL and then starting another webview to load a PWA from a remote URL?

Thanks in advance,
Dario

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>