<?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>198606</bug_id>
          
          <creation_ts>2019-06-06 04:41:03 -0700</creation_ts>
          <short_desc>Implement the Web Share API Level 2</short_desc>
          <delta_ts>2021-05-11 08:46:37 -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>DOM</component>
          <version>Safari 12</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>207491</dependson>
    
    <dependson>209265</dependson>
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Thomas Steiner">tomac</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashley</cc>
    
    <cc>blakebullis</cc>
    
    <cc>cdumez</cc>
    
    <cc>connell</cc>
    
    <cc>gabrielenosso</cc>
    
    <cc>gynet.gy</cc>
    
    <cc>hello</cc>
    
    <cc>juliosincesar</cc>
    
    <cc>marcos</cc>
    
    <cc>mc</cc>
    
    <cc>mjs</cc>
    
    <cc>nicolas</cc>
    
    <cc>rigel</cc>
    
    <cc>rniwa</cc>
    
    <cc>samy</cc>
    
    <cc>thorton</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1542352</commentid>
    <comment_count>0</comment_count>
    <who name="Thomas Steiner">tomac</who>
    <bug_when>2019-06-06 04:41:03 -0700</bug_when>
    <thetext>WebKit supports &quot;Web Share — Level 1&quot; since https://bugs.webkit.org/show_bug.cgi?id=171100 was resolved (🙏 thanks!).

&quot;Web Share — Level 2&quot; adds a feature detection method `canShare()`, and the `ShareData` dictionary now has a `files` member for sharing files (https://wicg.github.io/web-share/level-2/#changes-since-level-1).

This allows use cases like sharing images apart from text.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1637304</commentid>
    <comment_count>1</comment_count>
    <who name="Gabriele Nosso">gabrielenosso</who>
    <bug_when>2020-04-03 04:24:36 -0700</bug_when>
    <thetext>Hi everyone,
I am Gabriele, Software Architect for X-Rite Pantone (www.pantone.com, www.xrite.com).

We have hundreds of thousands per user on our website per month, so we are expecting a high number of users also in our new apps.

We will soon release a mobile App for Pantone  for both iOS and Android, which will provide a sharing palettes/pictures features.

It would be amazing to have the Web Share Api level 2 implemented, so we could make the feature available also on iOS.

Is there any ETA for this task?

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1639648</commentid>
    <comment_count>2</comment_count>
    <who name="Samy Dindane">samy</who>
    <bug_when>2020-04-09 08:13:20 -0700</bug_when>
    <thetext>Hello,

My name is Samy and I am the founder of Hypefury. We help online entrepreneurs grow their audience and market their products.

We already implemented features such as sharing pictures on Instagram, and they work perfectly on Android.

Most our users use iPhones though, and supporting level 2 sharing would make their experience a whole.

Thank you,

Samy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1649535</commentid>
    <comment_count>3</comment_count>
    <who name="Thomas Steiner">tomac</who>
    <bug_when>2020-05-06 01:21:10 -0700</bug_when>
    <thetext>Fixed via https://bugs.webkit.org/show_bug.cgi?id=207491.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1650021</commentid>
    <comment_count>4</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2020-05-07 02:16:40 -0700</bug_when>
    <thetext>Looks like this hasn&apos;t fully landed yet, so reopening and adding relevant dependencies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1651155</commentid>
    <comment_count>5</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2020-05-10 18:50:24 -0700</bug_when>
    <thetext>All subtasks are complete, but this isn&apos;t enabled by default yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1654500</commentid>
    <comment_count>6</comment_count>
    <who name="Erik Murphy-Chutorian">mc</who>
    <bug_when>2020-05-20 10:15:57 -0700</bug_when>
    <thetext>I&apos;m thrilled to see the progress on this bug. Media sharing for &apos;image/jpeg&apos; and &apos;video/mp4&apos; files has been a top requested feature for our web platform from numerous big brands and creative agencies.

Any chance this will be enabled by default in iOS 13.6+?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1656834</commentid>
    <comment_count>7</comment_count>
    <who name="Matt Oakes">hello</who>
    <bug_when>2020-05-28 07:20:12 -0700</bug_when>
    <thetext>Just to note that while the &quot;canShare&quot; method was implemented and accepted, support for the &quot;files&quot; property is still not implemented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1656852</commentid>
    <comment_count>8</comment_count>
    <who name="Erik Murphy-Chutorian">mc</who>
    <bug_when>2020-05-28 08:07:20 -0700</bug_when>
    <thetext>@Matt, even with the following resolved dependent bug &quot;Implement web-share v2 for files&quot;? https://bugs.webkit.org/show_bug.cgi?id=209265</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1669057</commentid>
    <comment_count>9</comment_count>
    <who name="jcesarmobile">juliosincesar</who>
    <bug_when>2020-07-06 10:01:54 -0700</bug_when>
    <thetext>Seems to be implemented on iOS 14 (first beta) including WKWebView, but with a few problems.

I tested with this website https://w3c.github.io/web-share/demos/share-files.html

The title is not used, the message is shown instead.

Sharing to AirDrop sometimes show an error or don&apos;t properly share some of the items.
Sharing to twitter doesn&apos;t show the selected images and don&apos;t let you share (probably because of that)
Sharing to messages or mail doesn&apos;t attach the images.


Other than that, it looks like a good starting point for iOS 14 before it&apos;s final.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1669059</commentid>
    <comment_count>10</comment_count>
    <who name="jcesarmobile">juliosincesar</who>
    <bug_when>2020-07-06 10:08:09 -0700</bug_when>
    <thetext>Note that &quot;Web Share API Level 2&quot; is still disabled as default in the experimental section of Safari settings, but it&apos;s working fine without enabling it. Not sure if it could stop working in future beta releases or if it means that it is no longer experimental.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1689497</commentid>
    <comment_count>11</comment_count>
    <who name="">rigel</who>
    <bug_when>2020-09-17 10:21:13 -0700</bug_when>
    <thetext>This API works well but is turned off by default in iOS 14. Please either turn it on by default or promote it out of experimental features as many of our customers rely on this functionality. Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1689501</commentid>
    <comment_count>12</comment_count>
    <who name="Erik Murphy-Chutorian">mc</who>
    <bug_when>2020-09-17 10:40:01 -0700</bug_when>
    <thetext>WebShare V2 was working really well in all of the iOS14 betas for file sharing, and we were looking forward to see this launch (default-enabled) in iOS14. This was the most exciting thing about iOS 14 for my company. It is such critical functionality for web developers to be able to share mp4 video files and jpgs to native applications, and Safari is really the only remaining majority browser lacking this ability.


Needless to say, is was discouraging to see it switch off with the public release after building websites in anticipation that would have worked well had the public release matched the betas. Please re-enable WebShare V2 file sharing as a default for Safari users!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690690</commentid>
    <comment_count>13</comment_count>
    <who name="Blake Bullis">blakebullis</who>
    <bug_when>2020-09-22 07:45:49 -0700</bug_when>
    <thetext>Sad here as well to find L2 is disabled by default in the latest iOS update. Please enable by default, we live in a world of sharing media and this feature will allow developers to enrich the user experience for all Apple users.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1691370</commentid>
    <comment_count>14</comment_count>
    <who name="Marcos Caceres">marcos</who>
    <bug_when>2020-09-23 20:09:19 -0700</bug_when>
    <thetext>Note that &quot;Level 2&quot; is no longer a thing: The the &quot;L2&quot; stuff has is being merged into the core spec, and &quot;L2&quot; just redirects to the main spec. 

Note also that Mozilla folks found significant issues with .canShare():
https://github.com/w3c/web-share/issues/108#issuecomment-697689527

This issue can probably be closed as invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1691394</commentid>
    <comment_count>15</comment_count>
    <who name="Marcos Caceres">marcos</who>
    <bug_when>2020-09-23 23:15:31 -0700</bug_when>
    <thetext>Just want to clarify that I think the &quot;level 2&quot; support aspect of this bug is invalid (because there is no level 2 spec anymore). However, other bugs that arise from sharing files and .canShare() should be addressed separately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1691421</commentid>
    <comment_count>16</comment_count>
    <who name="Thomas Steiner">tomac</who>
    <bug_when>2020-09-24 01:25:16 -0700</bug_when>
    <thetext>Updated core spec link: https://w3c.github.io/web-share/#api-definition.

This is implemented behind a flag in Safari 14 (using the &quot;Level 2&quot; name suffix), so the status of this bug is probably &quot;Resolved&quot;.

Other questions like the fate of `canShare()` indeed deserve new bugs once the spec issues have been closed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718756</commentid>
    <comment_count>17</comment_count>
    <who name="Rodrigo Schneider">rodrigoschneider94</who>
    <bug_when>2021-01-11 11:38:50 -0800</bug_when>
    <thetext>There&apos;s already some ETA for this one in Safari? I mean, it&apos;s really important for us Web devs to have (specially on iOS / iPadOS devices) this feature. Giving the user by just clicking some button on the page the ability to share something with any app would be awesome. It says &quot;RESOLVED FIXED&quot; but as far as I saw (including Safari Beta versions) it&apos;s not already there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718827</commentid>
    <comment_count>18</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2021-01-11 15:03:42 -0800</bug_when>
    <thetext>(In reply to Rodrigo Schneider from comment #17)
&gt; There&apos;s already some ETA for this one in Safari? I mean, it&apos;s really
&gt; important for us Web devs to have (specially on iOS / iPadOS devices) this
&gt; feature. Giving the user by just clicking some button on the page the
&gt; ability to share something with any app would be awesome. It says &quot;RESOLVED
&gt; FIXED&quot; but as far as I saw (including Safari Beta versions) it&apos;s not already
&gt; there.

Seems to be enabled in iOS 14 / Safari 14 as far as I checked? Which feature are you talking about?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718831</commentid>
    <comment_count>19</comment_count>
    <who name="Rodrigo Schneider">rodrigoschneider94</who>
    <bug_when>2021-01-11 15:21:00 -0800</bug_when>
    <thetext>(In reply to Ryosuke Niwa from comment #18)
&gt; (In reply to Rodrigo Schneider from comment #17)
&gt; &gt; There&apos;s already some ETA for this one in Safari? I mean, it&apos;s really
&gt; &gt; important for us Web devs to have (specially on iOS / iPadOS devices) this
&gt; &gt; feature. Giving the user by just clicking some button on the page the
&gt; &gt; ability to share something with any app would be awesome. It says &quot;RESOLVED
&gt; &gt; FIXED&quot; but as far as I saw (including Safari Beta versions) it&apos;s not already
&gt; &gt; there.
&gt; 
&gt; Seems to be enabled in iOS 14 / Safari 14 as far as I checked? Which feature
&gt; are you talking about?

Hey, sorry! I forgot to explain it better, what I meant is about the canShare method of the API, this one is not already shipped, as it says here in the original feature link from Chrome Status (https://www.chromestatus.com/feature/4777349178458112#:~:text=Web%20Share%20API%20Level%202%20allows%20sharing%20of%20files%20from,urls%20could%20previously%20be%20shared.) right? That would be a great feature for the devs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718834</commentid>
    <comment_count>20</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2021-01-11 15:24:53 -0800</bug_when>
    <thetext>(In reply to Rodrigo Schneider from comment #19)
&gt; (In reply to Ryosuke Niwa from comment #18)
&gt; &gt; (In reply to Rodrigo Schneider from comment #17)
&gt; &gt; &gt; There&apos;s already some ETA for this one in Safari? I mean, it&apos;s really
&gt; &gt; &gt; important for us Web devs to have (specially on iOS / iPadOS devices) this
&gt; &gt; &gt; feature. Giving the user by just clicking some button on the page the
&gt; &gt; &gt; ability to share something with any app would be awesome. It says &quot;RESOLVED
&gt; &gt; &gt; FIXED&quot; but as far as I saw (including Safari Beta versions) it&apos;s not already
&gt; &gt; &gt; there.
&gt; &gt; 
&gt; &gt; Seems to be enabled in iOS 14 / Safari 14 as far as I checked? Which feature
&gt; &gt; are you talking about?
&gt; 
&gt; Hey, sorry! I forgot to explain it better, what I meant is about the
&gt; canShare method of the API, this one is not already shipped, as it says here
&gt; in the original feature link from Chrome Status
&gt; (https://www.chromestatus.com/feature/4777349178458112#:~:
&gt; text=Web%20Share%20API%20Level%202%20allows%20sharing%20of%20files%20from,
&gt; urls%20could%20previously%20be%20shared.) right? That would be a great
&gt; feature for the devs.

I don&apos;t understand why you&apos;re referring to Chrome Status page but canShare API is definitely implemented and present in iOS 14 and Safari 14.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718837</commentid>
    <comment_count>21</comment_count>
    <who name="jcesarmobile">juliosincesar</who>
    <bug_when>2021-01-11 15:31:56 -0800</bug_when>
    <thetext>I forked this fiddle
https://jsfiddle.net/ericwilligers/8cpuskqd/

Removing the canShare() checks as they don’t work (as it’s non standard)
And sharing images don’t seem to work on latest beta

https://jsfiddle.net/g1uLhvpw/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718838</commentid>
    <comment_count>22</comment_count>
    <who name="">rigel</who>
    <bug_when>2021-01-11 15:34:59 -0800</bug_when>
    <thetext>I was under the impression this was fixed but hadn&apos;t made it into an iOS build yet.

See: https://bugs.webkit.org/show_bug.cgi?id=217105</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718840</commentid>
    <comment_count>23</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2021-01-11 15:36:26 -0800</bug_when>
    <thetext>(In reply to jcesarmobile from comment #21)
&gt; I forked this fiddle
&gt; https://jsfiddle.net/ericwilligers/8cpuskqd/
&gt; 
&gt; Removing the canShare() checks as they don’t work (as it’s non standard)
&gt; And sharing images don’t seem to work on latest beta
&gt; 
&gt; https://jsfiddle.net/g1uLhvpw/

What Safari / iOS version did you test? It&apos;s working for me on Safari 14 &amp; iOS 14.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718843</commentid>
    <comment_count>24</comment_count>
    <who name="jcesarmobile">juliosincesar</who>
    <bug_when>2021-01-11 15:39:33 -0800</bug_when>
    <thetext>Latest beta of iOS 14.4

According to my comment from last July, it was working fine on the first iOS 14 beta
https://bugs.webkit.org/show_bug.cgi?id=198606#c9</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718847</commentid>
    <comment_count>25</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2021-01-11 15:42:00 -0800</bug_when>
    <thetext>(In reply to jcesarmobile from comment #24)
&gt; Latest beta of iOS 14.4
&gt; 
&gt; According to my comment from last July, it was working fine on the first iOS
&gt; 14 beta
&gt; https://bugs.webkit.org/show_bug.cgi?id=198606#c9

Did you test it in Safari or some other app that embeds WKWebView?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718849</commentid>
    <comment_count>26</comment_count>
    <who name="jcesarmobile">juliosincesar</who>
    <bug_when>2021-01-11 15:43:01 -0800</bug_when>
    <thetext>Safari</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718850</commentid>
    <comment_count>27</comment_count>
    <who name="jcesarmobile">juliosincesar</who>
    <bug_when>2021-01-11 15:43:10 -0800</bug_when>
    <thetext>Safari</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718851</commentid>
    <comment_count>28</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2021-01-11 15:45:25 -0800</bug_when>
    <thetext>Ah, my bad. I was getting confused. Web Share v2 is indeed not yet enabled in iOS 14 / Safari 14.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718908</commentid>
    <comment_count>29</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2021-01-11 23:14:54 -0800</bug_when>
    <thetext>Sorry, somehow I missed all the comments here... let me lend some clarity:

(In reply to jcesarmobile from comment #10)
&gt; Note that &quot;Web Share API Level 2&quot; is still disabled as default in the
&gt; experimental section of Safari settings, but it&apos;s working fine without
&gt; enabling it. Not sure if it could stop working in future beta releases or if
&gt; it means that it is no longer experimental.

This was a bug, fixed in https://trac.webkit.org/changeset/266158/webkit.

(In reply to Marcos Caceres from comment #14)
&gt; Note that &quot;Level 2&quot; is no longer a thing: The the &quot;L2&quot; stuff has is being
&gt; merged into the core spec, and &quot;L2&quot; just redirects to the main spec. 

We know, and this could be retitled &quot;Support canShare and ShareData.files&quot; or something; but it does track a code change, so is /not/ status-&gt;invalid.

(In reply to Rodrigo Schneider from comment #17)
&gt; There&apos;s already some ETA for this one in Safari? I mean, it&apos;s really
&gt; important for us Web devs to have (specially on iOS / iPadOS devices) this
&gt; feature. Giving the user by just clicking some button on the page the
&gt; ability to share something with any app would be awesome. It says &quot;RESOLVED
&gt; FIXED&quot; but as far as I saw (including Safari Beta versions) it&apos;s not already
&gt; there.

https://trac.webkit.org/changeset/267762/webkit tracks turning the &quot;level 2 but not called that anymore&quot; features on everywhere that the &quot;level 1 but not called that anymore&quot; features are on...

... however, Apple doesn&apos;t comment on the timing of features (there was some confusion about this feature because of the aforementioned bug causing it to be available in beta releases; apologies for that!!).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1718950</commentid>
    <comment_count>30</comment_count>
    <who name="Rodrigo Schneider">rodrigoschneider94</who>
    <bug_when>2021-01-12 04:00:16 -0800</bug_when>
    <thetext>(In reply to Tim Horton from comment #29)
&gt; Sorry, somehow I missed all the comments here... let me lend some clarity:

&gt; 
&gt; https://trac.webkit.org/changeset/267762/webkit tracks turning the &quot;level 2
&gt; but not called that anymore&quot; features on everywhere that the &quot;level 1 but
&gt; not called that anymore&quot; features are on...
&gt; 
&gt; ... however, Apple doesn&apos;t comment on the timing of features (there was some
&gt; confusion about this feature because of the aforementioned bug causing it to
&gt; be available in beta releases; apologies for that!!).

Hi Tim, thanks for bringing all the explanation and the link for a &quot;correct&quot;, let&apos;s say so, feature tracking of what we really need. I&apos;ll follow up there. :)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>