Service worker support is currently available in Safari, but not in Apple's webview component available to developers called
But is kind of changing, and I believe the answer is "apps web browsers" may now enable the Service Worker entitlement, but other apps using
WKWebView are still not allowed to.
This is not plainly stated anywhere, here are a bunch of tweets I am using as my basis for understanding, but I'm curious if anybody understands this better than I do.
Thomas SteinerOn iOS 14, `WKWebView` will get service worker support. 🎉 This means all third-party browsers like @GoogleChrome for iOS or @Firefox for iOS will have access to this powerful API! It’s still the @WebKit engine under the hood, not Blink or Gecko. twitter.com/othermaciej/st…06:48 AM - 24 Jun 2020othermaciej @othermaciej@pes10k @johnwilander Good news! You’ve probably heard that iOS users will be able to change the system default browser. This will require an entitlement, process to be documented soon. That same entitlement will grant access to Service Workers.
Thomas Steiner@othermaciej @michihuber @googlechrome @firefox @webkit Maciej has posted about this only yesterday, it (unfortunately) wasn’t covered in the WWDC sessions: twitter.com/othermaciej/st…08:17 AM - 05 Aug 2020othermaciej @othermaciejThe rules and review process for iOS default email client and default browser are now published. Also documents the capabilities that come with the default browser entitlement, including support for Service Workers. https://t.co/Mx1US6zSpq
Kevin Kelchen@kevinkelchen@othermaciej Out of curiosity, could this mean that non-browser apps that use WKWebView (like a hybrid app) use Service Workers if they have the entitlement? Could the entitlement be granted for that use case?
Thanks! 🙂22:25 PM - 04 Aug 2020
othermaciej@othermaciej@KevinKelchen We know there's interest in this. Not part of this announcement.23:15 PM - 04 Aug 2020