Enabling WKWebView ServiceWorker on real device

We are trying to use Service Worker in WKWebView, and found out that we need to add 'com.apple.developer.WebKit.ServiceWorkers' in entitlement file. It's working in Simulator but not on a real device because the provisioning profile need to include 'com.apple.developer.WebKit.ServiceWorkers' entitlement, which we can not add from the certificates portal.

Is there anyway to enable WKWebView's Service Worker on a real device?

Thank you

As far as I know there are no way to enable Service Worker inside WKWebView unless you enable Web Browser entitlement for your application, at least this is the situation at current moment. See here for more details about Web Browser entitlement: https://developer.apple.com/documentation/xcode/preparing-your-app-to-be-the-default-browser-or-email-client

but how Telegram messenger in-app browser supports Service Workers? As far i know, Telegram messenger is not browser and can not be set as default browser 🤔

For example: I have a super app (hybrid) that serves mini-apps (PWA enabled) also native functionality like chat and other functionality, so WKAppBoundDomains + limitsNavigationsToAppBoundDomains is not solution for me, because mini-apps could be hosted on different domains. But my app could not apply as default browser, so how to solve this problem

PS: PWA uses only for offline mode, without home screen and other features.

Enabling WKWebView ServiceWorker on real device
 
 
Q