<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>233315</bug_id>
          
          <creation_ts>2021-11-18 05:03:48 -0800</creation_ts>
          <short_desc>WKWebView does not allow remembering permissions granted by the user?</short_desc>
          <delta_ts>2021-11-18 13:23:54 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit API</component>
          <version>Other</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>223806</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Franz">franz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ggaren</cc>
    
    <cc>jonlee</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1816391</commentid>
    <comment_count>0</comment_count>
    <who name="Franz">franz</who>
    <bug_when>2021-11-18 05:03:48 -0800</bug_when>
    <thetext>What&apos;s happening: We&apos;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: &quot;do not ask again for this site&quot;). I couldn&apos;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&apos;ve missed something, I&apos;d be glad to hear about it.

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1816571</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-11-18 12:45:28 -0800</bug_when>
    <thetext>&lt;rdar://problem/85563772&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1816595</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2021-11-18 13:23:54 -0800</bug_when>
    <thetext>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 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>