Ionic 6 cordova/capacitor social share 不适用于 ios

问题描述 投票:0回答:1

我在 Android 上使用“cordova-plugin-x-socialsharing”它工作正常,但在 IOS 上尝试与任何社交网络共享时我收到错误“不可用”

As an alternative, I tried using the "Share capacitor", but when choosing whatsapp an alert is displayed with the message "Open Whatsapp from the home screen to continue" however even opening the application it continues to display this same message.

shareWithWhatsapp(content) {
   this.sharePlugin
      .canShareVia('whatsapp', content.message, '', content.image, content.url)
      .then(() => {
        this.sharePlugin.shareViaWhatsApp(content.message, content.image, content.url);
      })
      .catch((e) => {
        this.showMessage('Error to try share with whatsapp');
      });
}
ios ionic-framework cordova-plugins capacitor
1个回答
0
投票

尝试只分享消息,也许 whatsapp 仍然有分享插件的问题。

请注意,在 iOS 上共享图像和文本时,只会共享图像 - 希望 WhatsApp 创建适当的 iOS 扩展程序来解决此问题。

参考:https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#whatsapp

© www.soinside.com 2019 - 2024. All rights reserved.