Web Share Api not working on iosv safari as excepted

251 views Asked by At

web share api not working in safari ios 16

here's my function and i want it to works only when clicking a button and pass the parameter i want to share

  if (navigator.share) {
    navigator
      .share({
        text: text,
        url: "https://example.com",
        title: "hi",
      })
      .then(() => alert(text))
      .catch((error) => alert("Sharing failed", error));
  } else {
    alert("eror");
  }
};
1

There are 1 answers

1
Ivan Ivanov On

Have you had a chance to look into this question? Looks like it could be helpful.