WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
206741
WKWebView support for Service Workers
https://bugs.webkit.org/show_bug.cgi?id=206741
Summary
WKWebView support for Service Workers
Krzysztof Jan Modras [:chrmod]
Reported
2020-01-24 05:27:20 PST
iOS version of Safari has some service workers capabilities. Yet WKWebView does not implement any of those. Is there a plan to enable service workers or a way to contribute to make it happen?
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-02-19 01:56:45 PST
<
rdar://problem/59584040
>
Maciej Stachowiak
Comment 2
2020-02-19 01:59:31 PST
We're looking into ways to enable this.
Victor Costan
Comment 3
2020-04-28 11:30:01 PDT
The lack of Service Workers support in third-party browsers on iOS is hurting Chrome's AppCache removal efforts. AppCache is owned and will hopefully be removed by my team, and we would appreciate having Service Workers be available to all iOS browsers. You can see a developer complaint at
https://crbug.com/582750#c54
. My light searching turned up
https://bugs.webkit.org/show_bug.cgi?id=182865
, which suggests that WKWebView gates SW support on the com.apple.developer.WebKit.ServiceWorkers entitlement. I'm told that the entitlement is not available in the app console.
Sung Jeon
Comment 4
2023-03-21 21:00:08 PDT
Any updates on this issue? If the tweet by Maciej Stachowiak [1] is a valid solution, I think this issue can be closed by documenting that Service Workers would only work with App-Bound Domains. [1]:
https://twitter.com/othermaciej/status/1295434201865412608
tristan-morris
Comment 5
2023-06-26 21:32:35 PDT
Trialling this today with AppBoundDomains set, navigator.serviceWorker is exposed. But workers can only be loaded via HTTP or HTTPS protocols. Workers can't be loaded from a custom URL scheme (at least if set via setURLSchemeHandler -
https://developer.apple.com/documentation/webkit/wkwebviewconfiguration
). Ideally it would be possible to load workers from customproto://localhost/service-worker.js for example.
Nathan Wild
Comment 6
2023-11-14 08:10:01 PST
Is there an intention in the future to make this work with custom URL schemes for loading/registering the service worker? There's a known limitation right now with apps that are solely built on wrappers creating a WKWebView to display their content (Cordova, Capacitor etc.) that service workers aren't a possible solution for handling offline content, passing authorization headers etc. on known requests. For example, Capacitor uses its own custom URL scheme (capacitor://) to serve content as http/https are reserved for remote content, this alone would prevent service workers from being used as they would need to be served under that protocol instead, see
https://github.com/ionic-team/capacitor/issues/7069
.
Michal
Comment 7
2024-03-15 08:55:01 PDT
Guys, please consider to enable this feature. Without it, the use of the web application within the web view is limited. For example, if you want to manage file uploads.
Francisco Baena
Comment 8
2024-12-15 15:27:46 PST
Is there any update about supporting custom
Francisco Baena
Comment 9
2024-12-15 15:35:39 PST
(In reply to baena.francisco from
comment #8
)
> Is there any update about supporting custom
... URL schemes/protocol to register Service Workers?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug