8

As of iOS 15 appCache is disabled. So I am looking for alternative.

Is there an official way to enable WKWebView Service Workers?

I know that you can add info.plist key for WKAppBoundDomains and then enable them by instantiating the WKWebViews with limitsNavigationsToAppBoundDomains = YES enabled in the config. This will allow you to use service workers for the domains you have specified in the WKAppBoundDomains. Can I rely on this? I haven't found any Apple articles mentioning it.

h3dkandi
  • 1,106
  • 1
  • 12
  • 27
  • 1
    I tested this functionality with iOS14 and found the service worker to be patchy on wkwebview. Some app restarts it would register and work. Other times nothing. Same code, same app, sometimes SW sometimes none. I haven't tested in iOS15 as I've been other projects and haven't heard anything new. If you have more info I'm also interested. – iosepa May 05 '22 at 22:44

0 Answers0