Bug 198606 - Implement the Web Share API Level 2
Summary: Implement the Web Share API Level 2
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on: 207491 209265
  Show dependency treegraph
Reported: 2019-06-06 04:41 PDT by Thomas Steiner
Modified: 2020-07-06 10:08 PDT (History)
11 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Steiner 2019-06-06 04:41:03 PDT
WebKit supports "Web Share — Level 1" since https://bugs.webkit.org/show_bug.cgi?id=171100 was resolved (🙏 thanks!).

"Web Share — Level 2" 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.
Comment 1 Gabriele Nosso 2020-04-03 04:24:36 PDT
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?

Comment 2 Samy Dindane 2020-04-09 08:13:20 PDT

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,

Comment 3 Thomas Steiner 2020-05-06 01:21:10 PDT
Fixed via https://bugs.webkit.org/show_bug.cgi?id=207491.
Comment 4 Maciej Stachowiak 2020-05-07 02:16:40 PDT
Looks like this hasn't fully landed yet, so reopening and adding relevant dependencies.
Comment 5 Maciej Stachowiak 2020-05-10 18:50:24 PDT
All subtasks are complete, but this isn't enabled by default yet.
Comment 6 Erik Murphy-Chutorian 2020-05-20 10:15:57 PDT
I'm thrilled to see the progress on this bug. Media sharing for 'image/jpeg' and 'video/mp4' 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+?
Comment 7 Matt Oakes 2020-05-28 07:20:12 PDT
Just to note that while the "canShare" method was implemented and accepted, support for the "files" property is still not implemented.
Comment 8 Erik Murphy-Chutorian 2020-05-28 08:07:20 PDT
@Matt, even with the following resolved dependent bug "Implement web-share v2 for files"? https://bugs.webkit.org/show_bug.cgi?id=209265
Comment 9 jcesarmobile 2020-07-06 10:01:54 PDT
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't properly share some of the items.
Sharing to twitter doesn't show the selected images and don't let you share (probably because of that)
Sharing to messages or mail doesn't attach the images.

Other than that, it looks like a good starting point for iOS 14 before it's final.
Comment 10 jcesarmobile 2020-07-06 10:08:09 PDT
Note that "Web Share API Level 2" is still disabled as default in the experimental section of Safari settings, but it'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.