Bug 233315 - WKWebView does not allow remembering permissions granted by the user?
Summary: WKWebView does not allow remembering permissions granted by the user?
Status: RESOLVED DUPLICATE of bug 223806
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: Other
Hardware: iPhone / iPad iOS 14
: P2 Critical
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-18 05:03 PST by Franz
Modified: 2021-11-18 13:23 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franz 2021-11-18 05:03:48 PST
What's happening: We're loading a WebRTC-based mobile-optimized chat web app into WKWebView which allows users to toggle on their microphone and talk to others in a virtual room. However, the problem is that WKWebView will ask for this permission repeatedly: Once the app moves to the background and comes to the foreground again, and the user wants to toggle the microphone on again, the user is presented with a new permission prompt.

Expected behavior: WKWebView should remember the granted permission and not ask again.

Interestingly, iOS Safari has an option where the user can grant a website permanent permission (roughly: "do not ask again for this site"). I couldn't find any relevant APIs to facilitate this and consider it a critical bug, as it has a hugely negative impact on user experience.

If I've missed something, I'd be glad to hear about it.

Thanks
Comment 1 Radar WebKit Bug Importer 2021-11-18 12:45:28 PST
<rdar://problem/85563772>
Comment 2 youenn fablet 2021-11-18 13:23:54 PST
A WKUIDelegate  (https://developer.apple.com/documentation/webkit/wkuidelegate/3763087-webview?language=objc) can be used for that purpose. Please reopen if this is not sufficient.

*** This bug has been marked as a duplicate of bug 223806 ***