Skip to content

[BUG] Share Plugin: Can't share while sharing is in progress #2322

Open
@FabianClemenz

Description

@FabianClemenz

Bug Report

Plugin(s)

@capacitor/share
@cap-go/inappbrowser

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 7.0.1
  @capacitor/core: 7.0.1
  @capacitor/android: 7.0.1
  @capacitor/ios: 7.0.1

Installed Dependencies:

  @capacitor/cli: 7.0.1
  @capacitor/android: 7.0.1
  @capacitor/core: 7.0.1
  @capacitor/ios: 7.0.1

[success] iOS looking great! 👌
[success] Android looking great! 👌

Platform(s)

iOS

Current Behavior

  • Opened a WebView via InAppBrowser
  • add Eventlistener for share intent
  • Eventlistener triggers share intent and the message displays (only on iOS - Android is working)

Expected Behavior

The share intent should be shown

Code Reproduction

Link to reproduction

simply add this some where in your code, so the WebView opens and adds the eventlistenere

InAppBrowser.openWebView({
  url: "https://google.de"
});

InAppBrowser.addListener("messageFromWebview", async (event) => {
  await Share.share(event.detail)
});

In the Browser console of the WebView make following request

window.mobileApp.postMessage({'detail': {'title': 'Test', 'text': 'Some Test Text', 'url': 'https://google.de'}})

Then the message should appear

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions