<?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>213468</bug_id>
          
          <creation_ts>2020-06-22 09:38:04 -0700</creation_ts>
          <short_desc>WKWebView doesn&apos;t remember motion permission</short_desc>
          <delta_ts>2021-03-16 11:01:26 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>Other</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 13</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="jcesarmobile">juliosincesar</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>dvpdiner2</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1665072</commentid>
    <comment_count>0</comment_count>
    <who name="jcesarmobile">juliosincesar</who>
    <bug_when>2020-06-22 09:38:04 -0700</bug_when>
    <thetext>Every time you call DeviceMotionEvent.requestPermission() it shows the permission prompt, but it should remember and not show the prompt if it was granted (that&apos;s what all the native permissions do)

Sample app https://github.com/jcesarmobile/cordova-requestPermission-issue

run
cordova prepare
open platforms/ios/HelloCordova.xcworkspace
and run from Xcode on any iOS 13 device
click &quot;Access DeviceMotions&quot; and &quot;Allow&quot; on the prompt
run from Xcode again
click &quot;Access DeviceMotions&quot; again

the prompt is shown again, it should&apos;t because you already allowed it, DeviceMotionEvent.requestPermission() should just resolve.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1665610</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-06-23 17:49:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/64674099&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718932</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2021-01-12 02:13:03 -0800</bug_when>
    <thetext>Right, we should expose a delegate that allows application to persistently grant/deny permission.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>