Skip to content
Discussion options

You must be logged in to vote

The question is confusing because you say it's a PWA, but then mention webView.loadUrl(appUrl);.
So are you running it from Safari/Chrome or as native iOS/Android app.

If the later, Capacitor uses WKWebView on iOS, which doesn't support service workers. And on Android they work on the WebView, but doesn't work well when using Capacitor.
Capacitor apps don't need service workers for offline resources since the app ships with all the code bundled, so you should probably disable the service worker for the native build.
For Android, there is a workaround if you want the service worker to work, that will just pick the local files, see #1655 (comment)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@emanuelef1
Comment options

@jcesarmobile
Comment options

@emanuelef1
Comment options

Answer selected by emanuelef1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants