I've ended up using this workaround successfully, basically you load a local page that redirects to your actual page. For some reason this makes the service worker always work and the page load off-line from the start.
let html = """<html><head><meta http-equiv="Refresh" content="0; url='\(YOUR_URL_HERE)'" /></head><body></body></html>""" webView.loadHTMLString(html, baseURL: nil)
Post
Replies
Boosts
Views
Activity
Having the same problem here. Including that if you close the app, go to off-line (airplane) mode, and the re-open, it does not load.